The building blocks of legal AI. Docket turns a Supreme Court opinion into a structured, navigable case: the full text, an interactive knowledge graph of the parties, precedents, and authorities, and an AI agent that answers questions with citations, reading only the sections it needs.
Live demo: docket.bem.dev — Trump v. Barbara (No. 25-365).
Docket is a working, open-source proof of how quickly you can build a real legal AI product on bem. Everything you see, the structured opinion, the entity map, and the agent, is powered by bem.
- Parse. bem turns the slip opinion into clean, labeled sections and a typed entity graph (justices, opinions, precedents, statutes, holdings), each with evidence and page numbers.
- Persist. The results land in a bem bucket, assigned at the time of the call.
- Retrieve. The agent reaches the opinion through bem's file system. It lists, searches, and reads only the sections a question touches, instead of stuffing the whole opinion into context on every turn. That efficiency is the live cost meter in the chat.
- Answer. Grounded, cited responses, with the full structure and graph available to the reader the whole time.
- Next.js (App Router) + React + TypeScript
- Vercel AI SDK for the streaming agent and tool calls
- bem for parsing, the knowledge graph, and the file-system retrieval surface
- Deployed on Vercel
npm install
cp .env.example .env.local # add your keys
npm run devSee .env.example for the environment variables. The app ships with the parsed
opinion bundled in data/, so it runs with zero backend config; point it at a live
bem bucket to use your own documents.
One click on Vercel, or:
npm run build
vercel --prodMIT