cleandataengineering.aiAgent Harness, drawn simply
You are here: Real flows › 1a · Claim status, naming the claim

Agent Harness Tutorial · Real flows

Flow 1a: Claim status, naming the claim

Route: Direct. 0 model calls · 1 tool call · 104 ms · $0 · 14 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's the status of claim CLM-019002?"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 ›6claim_status + exactly one CLM-reference: "unambiguousclaim_status with one reference"Open: Direct: tool read + templateDirect: tool read + templatezoom in ›7tools/list (2 × ~25 ms) ·get_claim {"id": "CLM-019002"}over MCP with the OBO token ·template for "registered"Open: After-loop rulesAfter-loop ruleszoom in ›8no Tier-2 rule firesOpen: Before-reply checkBefore-reply checkzoom in ›9no_promise_of_cover,no_pii_echo, money_in_rupees:passOpen: Save and settleSave and settlezoom in ›10checkpoint 845 chars · ledgeransweredOpen: Trace writtenTrace writtenzoom in ›1114 spans in App Insights; nowords capturedReply: "Claim CLM-019002 is registered. An assessor will look at it and tell you what theyneed next."
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 teachesAnswer with a fixed flow first. The same question costs 104 ms and $0 here, against 7 seconds in flow 1b.

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