Legal Services Ontology
Comprehensive domain knowledge for law firms, corporate legal departments, and legal technology operations.
Overview
The Legal Services ontology equips AI agents with deep understanding of legal operations:
- Matter Management: Case intake, tracking, billing
- Document Automation: Contract drafting, review, analysis
- Client Services: Intake, communication, status updates
- Compliance: Ethics, conflicts, trust accounting
- Knowledge Management: Precedents, research, expertise
Ontology Layers
Role Layer
roles:
- name: Client Intake Agent
responsibilities:
- Process new client inquiries
- Gather case information
- Perform conflicts checks
- Schedule consultations
permissions:
- read: contacts, matters, conflicts_db
- execute: create_contact, schedule_meeting, run_conflict_check
- name: Legal Research Agent
responsibilities:
- Search legal databases
- Summarize case law
- Draft research memos
- Track regulatory changes
permissions:
- read: legal_databases, precedents, matter_files
- execute: search_westlaw, search_lexis, draft_memo
- name: Contract Review Agent
responsibilities:
- Extract key terms
- Compare to standards
- Flag risk provisions
- Track obligations
permissions:
- read: contracts, playbook, templates
- execute: extract_terms, flag_deviation, create_summary
Domain Layer
Key Entities
| Entity | Description | Key Attributes |
|---|---|---|
| Matter | Legal engagement | Number, Type, Status, Client, Attorney |
| Client | Legal consumer | ID, Name, Type, Matters, Billing |
| Document | Legal document | ID, Type, Version, Status, Matter |
| Contract | Agreement | ID, Parties, Terms, Obligations, Expiry |
| Time Entry | Billable work | ID, Attorney, Matter, Hours, Description |
| Invoice | Billing | Number, Matter, Amount, Status |
Entity Relationships
erDiagram
CLIENT ||--o{ MATTER : retains_for
MATTER ||--o{ DOCUMENT : contains
MATTER ||--o{ TIME_ENTRY : records
MATTER ||--o{ INVOICE : generates
ATTORNEY ||--o{ TIME_ENTRY : bills
ATTORNEY ||--o{ MATTER : works_on
CONTRACT ||--o{ OBLIGATION : contains
Interaction Layer
Common Workflows
Client Intake
sequenceDiagram
participant P as Prospect
participant A as Agent
participant S as System
participant L as Attorney
P->>A: Inquiry Received
A->>A: Gather Details
A->>S: Conflict Check
S-->>A: Clear/Conflict
A->>A: Risk Assessment
A->>L: Route for Review
L-->>A: Accept/Decline
A->>P: Engagement Letter
P->>A: Signed Agreement
A->>S: Open Matter
Contract Review
graph LR
A[Contract Received] --> B[Extract Terms]
B --> C[Compare to Playbook]
C --> D{Deviations?}
D -->|Yes| E[Flag Issues]
D -->|No| F[Approve]
E --> G[Attorney Review]
G --> H{Negotiate?}
H -->|Yes| I[Send Redlines]
H -->|No| F
F --> J[Execute]
Practice Areas
| Practice | Key Activities | Agent Support |
|---|---|---|
| Corporate | M&A, securities, governance | Due diligence, document review |
| Litigation | Discovery, motions, trial | Research, deadline tracking |
| Real Estate | Transactions, leasing | Title review, closing checklists |
| IP | Patents, trademarks | Prior art search, portfolio management |
| Employment | HR compliance, disputes | Policy review, investigation support |
Regulatory & Ethics
| Rule | Scope | Agent Safeguards |
|---|---|---|
| Attorney-Client Privilege | All communications | Never disclose privileged info |
| Conflicts of Interest | New matters | Mandatory conflict checks |
| Trust Accounting | Client funds | Segregation, audit trails |
| Unauthorized Practice | Legal advice | Clear disclaimers, attorney review |
| Data Security | Client data | Encryption, access controls |
Prompt Templates
Client Intake
You are a client intake agent for {firm_name}.
Inquiry Details:
- Contact: {contact_name}
- Source: {referral_source}
- Matter Type: {matter_type}
- Description: {description}
Gather:
1. Full contact information
2. Adverse parties (for conflicts)
3. Key dates and deadlines
4. Desired outcome
5. Budget expectations
Important:
- Do NOT provide legal advice
- Note: "This is not legal advice and does not create an attorney-client relationship"
- Flag urgent deadlines (statutes of limitations)
- Route to appropriate practice group
Contract Analysis
You are a contract review agent analyzing an agreement.
Contract Type: {contract_type}
Parties: {parties}
Key Terms Requested: {terms_to_extract}
Standard Playbook Position:
{playbook_terms}
Extract and analyze:
1. Identified terms vs. playbook standards
2. Risk provisions (indemnification, limitation of liability)
3. Unusual or non-standard clauses
4. Missing standard protections
5. Key dates and obligations
Format output as a comparison table with risk ratings (Low/Medium/High).
Legal Research
You are a legal research agent supporting {matter_name}.
Research Question: {question}
Jurisdiction: {jurisdiction}
Practice Area: {practice_area}
Search Strategy:
1. Identify relevant statutes and regulations
2. Find controlling case law
3. Note recent developments
4. Identify contrary authority
Output format:
- Issue statement
- Short answer
- Discussion with citations
- Conclusion
- Recommended next steps
Integration Points
Practice Management
| System | Capabilities | Agent Actions |
|---|---|---|
| Clio | Full PM suite | Matters, time, billing |
| PracticePanther | Cloud PM | Calendar, tasks, documents |
| MyCase | Client portal | Communications, payments |
Legal Research
| Platform | Coverage | Agent Use |
|---|---|---|
| Westlaw | Comprehensive US law | Case research, statutes |
| LexisNexis | Legal and business | Research, due diligence |
| Fastcase | Case law | Budget-friendly research |
Document Automation
| Tool | Function | Agent Integration |
|---|---|---|
| DocuSign | E-signatures | Execution workflows |
| Contract Express | Document assembly | Template generation |
| Kira | AI contract review | Extraction, analysis |
Metrics & KPIs
| Metric | Description | Agent Monitoring |
|---|---|---|
| Utilization Rate | Billable / available hours | Target > 70% |
| Realization Rate | Collected / billed | Alert if < 90% |
| Matter Cycle Time | Days to completion | Track by type |
| Client Satisfaction | Survey scores | Alert if < 85% |
| Deadline Compliance | On-time filings | Must be 100% |
Sample Agent Configuration
const legalAgent = {
name: "Client Services",
ontology: "legal-v1",
autonomyLevel: "L1", // Assisted - legal requires attorney oversight
capabilities: {
clientIntake: true,
conflictChecks: true,
calendarManagement: true,
documentDrafting: false // Requires attorney approval
},
guardrails: {
requireApprovalFor: [
"any_client_communication",
"document_filing",
"billing_adjustment"
],
blockedActions: [
"legal_advice",
"case_strategy",
"settlement_offers"
],
disclaimers: {
required: true,
text: "This communication does not constitute legal advice."
}
},
integrations: [
"clio_manage",
"westlaw",
"docusign"
]
};
Unauthorized Practice of Law
Legal AI agents must never provide legal advice or make strategic legal decisions. All substantive outputs require attorney review before client communication.
Getting Started
To deploy a Legal Services agent:
- Select the Legal ontology during workspace setup
- Configure practice management integration
- Set up conflict check database
- Enable mandatory attorney review workflows
- Start with L1 (Assisted) autonomy