Back to blog

AI Agents for Law Firms: What Copilot Actually Looks Like Inside a Practice Management System

Not theory. Not a roadmap. We built 38 API endpoints that let AI agents create matters, record time, check conflicts, and prepare invoices inside Business Central. Here's what that looks like in practice.

David Diamond16 May 20267 min read

Every legal tech vendor is talking about AI. Most of them mean a chatbot bolted onto their help page. Some mean a summarisation tool. A few mean a prompt that drafts a letter.

None of that is what we built.

38
Purpose-built API endpoints for AI agents
MatterX Copilot API surface
7
Client lifecycle systems covered end-to-end
Intake → Billing → Offboarding
0
Custom integration code required to connect
OData V4 + MCP standard protocol

MatterX ships with 38 API endpoints that give AI agents — Copilot, Claude, ChatGPT, or your firm's own — full operational access to your practice management system. Not read-only. Not summarisation. Creating matters, recording time, running conflict checks, preparing invoices, querying trust balances, tracing transactions through the general ledger.

Working infrastructure. Not a roadmap.

Why APIs, not chatbots

Most practice management systems that "support AI" embed a chat window inside the application. You click a Copilot icon and ask it a question within that walled garden. The AI can only do what the vendor coded. You're locked into whichever model they chose.

We went the opposite direction.

Embedded chatbot approach
Locked to one AI model chosen by the vendor
Can only do what the vendor explicitly coded
Walled garden — no cross-system composition
New capabilities require vendor updates
MatterX API approach
Your firm picks the AI — Copilot, Claude, ChatGPT, local models
Any operation available in the UI is available via API
Agents compose across Outlook, Calendar, SharePoint + MatterX
Every new feature automatically gets an API endpoint

The endpoints sit behind Microsoft Entra ID authentication and module licensing. Once authenticated, an AI agent can do anything a human user can do through the UI. The practice management system doesn't care which AI is calling — it authenticates the request and processes it.

The Model Context Protocol angle

We've been using the Dynamics 365 Business Central MCP server to connect AI agents directly to MatterX. MCP lets AI models discover and call external tools through a standard protocol. An agent can browse matters, check trust balances, and create time entries — conversationally, without custom integration code.

38 endpoints across seven systems

We designed the Copilot API surface to cover every system in the client lifecycle. Click any system below to see the AI capabilities it unlocks, the specific endpoints, and real-world examples.

🤖

MatterX Copilot API — 38 Endpoints Across 7 Systems

Click any system to explore AI capabilities, API endpoints, and real-world examples

Select a system to explore how AI agents interact with MatterX

The endpoint count isn't the point — coverage is. An AI that can read matters but can't create time entries is a reporting tool. One that creates time entries but can't check trust balances is a liability. The 38 endpoints exist because that's what it takes to cover the full operational surface.

What it actually looks like

Theory is cheap. Here are three real scenarios showing what happens when an AI agent has full API access. The API calls shown are actual endpoint patterns and response structures.

💬

AI Agent Conversations — Real MatterX API Calls

See what happens when an AI agent connects to your practice management system

Create a full week of time entries from a conversational description

Click Play to watch the conversation unfold, or Show all to see the full exchange.

Under the hood

Time entry scenario — the agent parsed a natural-language week description, looked up matter numbers and billable rates, and batch-created six entries in one API call. A human would open the time entry page six times. The API call takes milliseconds.

Conflict check — two names in, structured JSON out. The system searches customers, contacts, matter contacts, and related entities. Match confidence levels (exact, partial, fuzzy) give the agent data it can reason about — not a PDF to interpret.

Billing review — multiple endpoints combined: WIP entries for unbilled work, budget alerts for matters approaching caps, and enough context for a nuanced recommendation. Invoice two now, hold the third for a client conversation.

Trust accounting and AI

Trust accounting is where firms get nervous about AI. Rightly so — in Australian jurisdictions, trust errors trigger regulatory investigation.

What the AI can read
Trust balances by matter and bank account
Trust receipt and payment ledger entries
Anomalies and discrepancies across accounts
Unreconciled deposits and pending clearances
What the validation engine enforces
Cannot overdraw a trust account — same rules as the UI
BC posting engine validates regardless of entry method
Every trust transaction posts to the general ledger
Full audit trail on every operation

An agent that monitors trust accounts and alerts you to anomalies is a compliance tool. The API makes it possible. The posting engine makes it safe.

MatterX's matterConflictChecks endpoint accepts a matter number (optional) and a free-text search term. The server-side codeunit searches all relevant entities, computes match confidence, and returns structured JSON:

{
  "performed": true,
  "matchCount": 2,
  "matches": [
    {
      "entityType": "Customer",
      "entityNo": "C-1847",
      "name": "Michael Chen",
      "matchField": "Name",
      "confidence": "Exact"
    }
  ],
  "matchesByEntity": {
    "Customer": 1,
    "MatterContact": 1
  }
}

The AI receives structured data it can reason about. "Two matches, one exact on Customer, one partial on MatterContact" is something an agent can evaluate. A PDF conflict report is not.

This is the difference between AI-assisted and AI-ready architecture.

Rate management: a practical example

MatterX's rate hierarchy — project override → client override → resource default → system fallback — is exposed through ratePreviews. An agent looks up the effective rate before creating a time entry.

Without this, associates create entries without knowing the rate. It gets applied at invoicing time, weeks later. If wrong — a missed client discount, a mid-engagement rate change — it's caught during billing review, when it's expensive to fix.

With the API, the rate lookup happens at creation time. If $375/hour appears on a matter that should be fixed-fee, the agent flags it immediately.

Effective dating matters

Rate changes have effective dates. The API returns the rate active on the date of the work, not today's rate. Catching up on last week? Each day gets the correct rate automatically.

Impact by firm size

30–45m
Billable time recovered per fee earner per day in 5–15 person firms
From calendar/email cross-referencing
3→1
Month-end billing days reduced for 15–30 person firms
Automated WIP surfacing + draft invoice prep
0
BI tools needed for practice analytics in 30–50 person firms
Conversational queries via resourcePerformances + valueFlows APIs

5–15 fee earners — time entry recovery. A conversational agent reads calendar and email, suggests entries for billable time that would otherwise go unrecorded.

15–30 fee earners — billing workflow compression. Surface unbilled WIP, flag budget overruns, prepare draft invoices. Plus conflict checking at the scale where manual searches become unreliable.

30–50 fee earners — conversational analytics. Utilisation tracking, realisation analysis, matter profitability — without a BI implementation or a data analyst.

The Microsoft ecosystem advantage

MatterX's API is one layer in a stack that includes Copilot across Outlook, Word, Excel, and Teams. The compounding effect is significant.

Copilot in Outlook reads and summarises emails. MatterX's API creates matters and links contacts. An agent combining both reads an engagement letter, extracts client details, runs a conflict check, and creates the matter — from a single prompt.

We've been running this workflow in production using the Business Central MCP server. Creating matters from email. Generating time entries from calendar activity. Filing documents based on content analysis. Production workflows, not demos.

Business Central's native API surface is OData V4. Microsoft's tooling — Power Automate, Power Apps, Logic Apps, Dataverse — all speak OData natively. By building as BC API pages we get standard Entra ID auth, native $filter/$select/$expand query support, self-describing bound actions, and full compatibility with Microsoft's AI stack.

A custom API would be one more thing to maintain, authenticate, and document. The BC approach means endpoints deploy with the extension, are governed by BC's permission model, and upgrade with the platform.

What's next

The 38 endpoints cover core operations. Three capabilities in development will make the integration significantly more powerful.

Document intelligence — combining SharePoint document metadata with Business Central matter context. An agent that files, classifies, and tags documents based on content analysis. SharePoint's AI capabilities plus MatterX's matter context.

Workflow triggers — agents subscribing to events (new matter, low trust balance, budget exceeded) for proactive action instead of waiting to be asked.

Multi-matter analysis — aggregate views across the entire practice: utilisation trends, revenue forecasting, client lifetime value. Conversational access to analytics that traditionally requires a BI implementation.

The API surface grows with the platform. Every feature gets an endpoint. Every endpoint makes the AI more capable. The compounding effect is the strategy.

See the Copilot API in action

We'll connect an AI agent to a demo MatterX environment and show you — live — how it handles time entry, conflict checking, and billing. Bring your scepticism.

Book a Demo
copilotai-agentspractice-managementmicrosoft-365api