DEV Community

iamthat
iamthat

Posted on Originally published at ailegal.legal

A legal oracle for agents: three endpoints and one honest refusal

An agent can pay for an API in milliseconds. It still cannot answer a simpler question: does this provision actually exist?

That is the gap a legal oracle fills. Not a chatbot that summarises law, but a machine-readable source an agent can query before it signs, files or quotes something.

Three questions, three endpoints

GET /api/v2/oracle/lookup?q=unpaid salary india&jurisdiction=in
→ 4 provisions, each with the official source URL

GET /api/v2/oracle/citation?code=Code on Wages&article=s. 17&jurisdiction=in
→ {"found": true, "verified": true}

GET /api/v2/oracle/citation?code=Fake Act&article=s. 999
→ {"found": false}
Enter fullscreen mode Exit fullscreen mode

The last answer is the important one. A legal AI that cannot say "no verified provision" will invent a plausible section number, and the reader will stop looking for the right one.

Coverage is the product

92 provisions across Russia, India, the US, the UK, Canada and Hong Kong — each read in the official source and re-checked on a schedule. When the corpus has nothing, found: false is returned and the agent must not cite anything.

How agents reach it

MCP, no account, no key:

{"mcpServers": {"ailegal": {"url": "https://ailegal.legal/api/mcp/", "transport": "streamable-http"}}}
Enter fullscreen mode Exit fullscreen mode

Tools: legal_breakdown, oracle_lookup, verify_citation. Free tier 120 calls/hour; volume can go through an x402 per-call rail at $0.05 USDC on Base.

Source: https://github.com/mrpkk/ailegal-mcp (MIT).
Docs: https://ailegal.legal/oracle

If your agent moves money or files documents, the oracle is the part that keeps it honest — and its refusals are as valuable as its answers.

Top comments (0)