cleandataengineering.aiAgent Harness, drawn simply
You are here: Real flows › 1b · Claim status, not naming it

Agent Harness Tutorial · Real flows

Flow 1b: Claim status, not naming it

Route: Agentic. 2 model calls · 2,187 tokens in, 340 out · 1 tool call · 7,076 ms · $0.00058 · 38 spans.

Open: Entra IDEntraIDOpen: PostgreSQLPostgresstateOpen: DBOSDBOSwaitsOpen: APIM → modelAPIM→ modelOpen: Claims (MCP)ClaimsMCPTHE BOXES IT PASSEDWHAT HAPPENEDBEFORE THE MESSAGEOpen: Sign-in with Microsoft EntraSign-in with Microsoft Entrazoom in ›1Rohan signs in with MicrosoftEntra ID (code flow + PKCE); thetoken stays in the pageOpen: Page opens: load the conversationPage opens: load the conversationzoom in ›2GET /opening: the newestcheckpoint is resumed if under24 h old, else a newconversationTHE MESSAGERohan: "what is the status of my claim"Open: Front doorFront doorzoom in ›3body ≤ 8 KiB · token verified →PH-1001 · kill switch onOpen: Delivery ledgerDelivery ledgerzoom in ›4new row PH-1001:<delivery id>,in_flight, expires in 600 sOpen: Anything waiting?Anything waiting?zoom in ›5nothing pendingOpen: RouterRouterzoom in ›6intent matched but no CLM-number: "ambiguous, multi-intentor unmodelled"Open: Consent: what his words allowConsent: what his words allowzoom in ›7no write asked forTRIP 1Open: Context assemblyContext assemblyzoom in ›8631 chars, 3 messagesOpen: Pre-model checkPre-model checkzoom in ›9no_known_injection: passOpen: Model callModel callzoom in ›105,513 ms · 652 in / 69 out (Groqitself 0.6 s) · APIM:allow-list, rate limit, ContentSafety passOpen: Read the answerRead the answerzoom in ›11wants a toolOpen: Pre-tool checkPre-tool checkzoom in ›12pass: a readOpen: Tool callTool callzoom in ›13list_claims {} · 51 ms · a read,no ledger row · 9 claimsOpen: Post-tool checkPost-tool checkzoom in ›14fenced ·no_instructions_in_result: passTRIP 2Open: Context assemblyContext assemblyzoom in ›153,385 chars: the result added,fencedOpen: Pre-model checkPre-model checkzoom in ›16no_known_injection: passOpen: Model callModel callzoom in ›171,329 ms · 1,535 in / 271 out ·APIM: allow-list, rate limit,Content Safety passOpen: Read the answerRead the answerzoom in ›18words: a candidate answerOpen: Post-model checkPost-model checkzoom in ›197 reply rules passOpen: After-loop rulesAfter-loop ruleszoom in ›20no Tier-2 rule fires · promisegate: passOpen: Before-reply checkBefore-reply checkzoom in ›21no_promise_of_cover,no_pii_echo, money_in_rupees:passOpen: Save and settleSave and settlezoom in ›22checkpoint 1,447 chars · ledgeransweredOpen: Trace writtenTrace writtenzoom in ›2338 spans · 5 Content Safetyverdicts, all passReply: "(a table of his claims)"
Left: the boxes this message really passed, in order; each opens its design page. Middle: the outside systems each box called, as dots on five lanes (Entra ID, PostgreSQL, DBOS, APIM in front of the model, the claims system over MCP); click a lane head to open it. Right: what happened. Grey boxes are checks, the dark box is the model, a crossed box is where something was blocked.
What it teachesThe router doesn't guess. Most of the wait isn't the model: Groq took 0.6 s and 1.0 s; the rest was APIM's cold start and Content Safety.

Want every detail? The long version is in the Series: this flow with real spans and payloads.