Agentic sweep · Claude Sonnet 5.5 · seven tools

The docket agent.
It reads. Code checks and decides.

Give it a jail's stack of court orders and the agent reads every file, then reports the facts with the words it read them from. Code checks every quote against the papers. A quote that isn't there goes back to the agent with the verifier's reason, and it can try again with the exact words. Where the papers fall short it asks for the missing record; where code finds a person past the line it drafts the 479(3) application. Then code, not the agent, builds the docket in order of who needs a lawyer first.

Guard rails, enforced in code and tested

  1. 01

    Verdicts come only from code

    submit_facts runs the span verifier and the rules engine. Extra fields such as a “verdict” are stripped before code sees them.

  2. 02

    Every fact needs a quote

    A quote that isn't in the document, or doesn't contain the date or section, is rejected with the reason and treated as unknown.

  3. 03

    Retries are capped

    Two resubmissions per file. After that, an unverified fact stays unknown and the person lands in “can't tell”.

  4. 04

    Records and drafts are gated

    A records request is refused unless the verified facts lack what it would supply; a 479(3) draft is refused unless code says past the line.

  5. 05

    The loop is bounded

    A step limit, a spend cap, and unknown file ids or tools refused. Text inside a document is fenced as data.

The run, step by step

Recorded run on the 12 constructed sample orders · as of 15 Nov 2026

This is a real run of the agent, recorded and replayed from its saved responses. Each line is one model turn or one tool call. Red lines are claims the verifier rejected; green lines are the same claims fixed with an exact quote.

Step 0 of 44 · turn 0 · 0 tool results · $0.000

The docket, in priority order

Built by code from verified facts only: past the line first (most days past at the top), then past the line but flagged under 479(2), then can't tell (records requested first), then not yet (soonest first), then outside 479. Open a file to see the papers, the marked quotes and the rule trace.

Docket for the 12 constructed sample orders, in priority order
#FileCode's verdictDaysQuotes verifiedRejected, then fixedRecords requestedDraft
01S02दी— कु—214/2024Past the lineline 20 May 2025+544days past the line40—Hindi draft
02S03J— M—46/2024Past the lineline 12 Jun 2026+156days past the line40—English draft
03S07ने— रा—58/2026Past the lineline 14 Jun 2026+154days past the line41, fixed 1—Hindi draft
04S01र— कु—87/2023Past the line · flaggedline 14 Mar 2024+976days past the line50—Hindi draft
05S11वि— प्र—188/2024Past the line · flaggedline 30 Nov 2025+350days past the line20
  • Criminal history report
    To,
    The Station House Officer of the police station concerned
    
    Subject: Request for criminal history report, 188/2024 (file S11)
    
    Sir/Madam,
    The court papers on file do not state whether the above undertrial has any previous conviction or other pending cases. Kindly furnish a report of the criminal history of the undertrial, so that the first proviso to Section 479(1) and Section 479(2) of the Bharatiya Nagarik Suraksha Sanhita, 2023 can be applied correctly.
    
    Legal-aid clinic, for the District Legal Services Authority
    Date: 2026-11-15
Hindi draft
06S09प— ला—276/2024Past the line · flaggedline 5 Feb 2026+283days past the line30
  • Criminal history report
    To,
    The Station House Officer of the police station concerned
    
    Subject: Request for criminal history report, 276/2024 (file S09)
    
    Sir/Madam,
    The court papers on file do not state whether the above undertrial has any previous conviction or other pending cases. Kindly furnish a report of the criminal history of the undertrial, so that the first proviso to Section 479(1) and Section 479(2) of the Bharatiya Nagarik Suraksha Sanhita, 2023 can be applied correctly.
    
    Legal-aid clinic, for the District Legal Services Authority
    Date: 2026-11-15
Hindi draft
07S05G— K—311/2023Can't tell1fact missing30
  • Custody certificate
    To,
    The Superintendent, District Jail
    
    Subject: Request for custody certificate, 311/2023 (file S05)
    
    Sir/Madam,
    The court papers on file do not establish the date on which the above undertrial was first taken into custody in this case. Kindly furnish a custody certificate stating the date of first custody and the periods of detention since, for review under Section 479 of the Bharatiya Nagarik Suraksha Sanhita, 2023.
    
    Legal-aid clinic, for the District Legal Services Authority
    Date: 2026-11-15
—
08S10A— T—95/2024Can't tell1fact missing90
  • Charge-sheet copy
    To,
    The Copying Section, Court of the Sessions Judge
    
    Subject: Request for certified copy of charge-sheet, 95/2024 (file S10)
    
    Sir/Madam,
    The court papers on file do not establish the sections under which the above undertrial is charged, or the maximum punishment for them. Kindly furnish a certified copy of the charge-sheet and of any charges framed, for review under Section 479 of the Bharatiya Nagarik Suraksha Sanhita, 2023.
    
    Legal-aid clinic, for the District Legal Services Authority
    Date: 2026-11-15
—
09S12S— P—31/2024Not yetline 17 Jul 2027244days to go70——
10S06रा— स—402/2025Not yetline 1 Mar 2028472days to go30——
11S08M— A—529/2023Not yetline 21 Jul 20301344days to go50——
12S04ह— सि—133/2024Outside 479—80——

The run in numbers

7 model turns on Claude Sonnet 5.5, with prompt caching on the growing conversation. Recorded on 14 Nov 2026. The single-pass sweep reads the same papers without an agent.

files read
12
tool calls
37
claims rejected by the verifier
1
fixed on retry with an exact quote
1
records requested
4
479(3) drafts written
6
model cost, whole docket
$0.20
model and tool time
50s

Run it on your papers

The same agent runs in this browser with your own Anthropic key. Your papers and your key go from this browser straight to Anthropic; our server never sees either. A run on ten orders costs roughly what the one above did, and is capped at one dollar.

Reading new papers calls Claude, billed to your own key. The key stays in this browser and goes straight to Anthropic; it never touches our server. Get one at console.anthropic.com. The sample tray works without a key.

Up to 10 files (PDF, scan or text, 15 pages each). Files are named F01, F02… in the log; nothing leaves this browser except the calls to Anthropic on your key.

Add your key above to enable this. The recorded run above needs no key.