cleandataengineering.aiAgent Harness, drawn simply
You are here: End to end › Checks › 5 · The tool itself › idempotency key

Agent Harness Tutorial · End to end · Zoom level 3

How we take care of it: idempotency key

idempotency key catches the same write twice.

Open: 11before loopopen ›Open: 22before modelopen ›Open: 33after modelopen ›Open: 44before toolopen ›Open: 55the toolopen ›Open: 66after toolopen ›Open: 77after loopopen ›Open: 88before replyopen ›It readsthe key in the MCP call's _meta(aoas/idempotency-key)idempotency keyrule · claims systempassCarries onfailIf it failsthe first answer againWHERE IN THE CODE: claims_system answered table
The strip at the top shows every check point where this check runs, in dark.

How we took care of it.

  1. The claims system's own answered table is keyed by (policyholder, key).
  2. A repeat gets the first answer: no second claim, no second payout.
It readsthe key in the MCP call's _meta (aoas/idempotency-key)
Kindrule
Provided byclaims system
If it failsthe first answer again
Where in the codeclaims_system answered table
Runs at5 · The tool itself
Real exampleWorks even if our own ledger were lost.

More on this: Exactly once.