← All projects
AI systemsRuns locally

Docket

The parts of an AI email assistant for a small law firm: sort incoming mail, pull out key facts and deadlines, and draft replies that a person has to approve. Built for a hypothetical firm on synthetic data.

Period

Jul 2026

Role

Sole engineer

Type

Runs locally

Tools

PythonFastAPIPostgreSQLSQLAlchemyClaude APIGmail APIpytestDocker
Source: private

What I was going for

Small firms get a lot of email that needs to be sorted, logged and answered, and missing a deadline buried in one is a real problem. The design was simple: read new mail, classify it, extract the parties and any deadlines, draft a reply, and send nothing until a person approves it.

What got built

A FastAPI backend on Postgres, using Postgres itself as the job queue with retries, backoff and a dead letter state. A Gmail provider that syncs new mail, parses it and threads replies correctly, plus a fake mailbox for testing. Classify, extract and draft steps that use forced tool calls and versioned prompts. Deadlines are quoted word for word from the email, never calculated. There are 96 backend tests.

I split the work into six streams and built them in parallel git worktrees in about two hours.

What's missing

The pieces never got wired together. The worker doesn't have its job handlers registered, so nothing runs end to end yet. The review dashboard and the eval harness were started but aren't merged. I'm listing it for the queue and the Gmail sync, which I think are the solid parts.

Diagram of Docket's triage flow
Diagram of Docket's triage flow
← PreviousEvokeNext →The Morning Dump