TopicProduction AI agents, switch topic
Verified 18 Nov 2026

Card-dispute agent · reference architecture

13 components · The full design lesson 2 builds towards. Pick a component to see what it does here, how it is set up, and what to watch for.

Goal · Least agency, full traceability

The system you’ll build

Reference architecture · 13 components

Eval harness pass^4 gateOTel collector gen_ai spansModel gateway route · cacheClaude models Sonnet · HaikuAudit log append-onlyPolicy · Cedar amount capWeb & app chat customersAPI gateway delegated tokenDispute workflow LangGraphMCP · card ledger statelessVector index per productReviewer queue evidence-first UICore banking system of record

Pick a component to see its detail.

Component

Dispute workflow

The orchestrator: runs each dispute as a graph of steps (find the transaction, explain it, open the dispute, propose a credit), calling the model and the tools.

Framework
LangGraph
Step cap
per conversation
Token budget
per conversation

Watch for

Without a token budget, model-gateway timeouts turn into retries on every live conversation, and the load cascades onto core banking.

In the threat modelASI01ASI06ASI08

Capacity · at 3× peak

From the cost model
Turns / min
250
Input tok / min
2.1M
Output tok / min
88k
Model cost / month
$37,944

20,000 conversations a day, 6 turns, Sonnet 5.5 with a 90% prompt-cache hit. Change it in the cost model.