The company
Call it Harbor, a composite online home goods retailer with a shopping assistant that buys on behalf of customers. A customer types a request, the agent searches several sellers, builds a cart, and for orders under a set amount completes payment using the payment protocol artifacts the industry now offers: a signed intent, a signed cart and a payment authorisation.
Harbor did the sensible thing. It adopted the protocol, kept the signed artifacts, and passed its security review. Leadership believed the question of proof was handled.
The dispute that exposed the gap
A customer asked the assistant to reorder a set of two shower curtains for a guest bathroom. A few days later, twelve curtains arrived. The customer disputed the charge.
Harbor pulled the evidence. The signed intent showed a spend cap the customer had accepted. The signed cart showed twelve units at the listed price, within the cap. The payment authorisation was valid. Everything the protocol promised was in order.
And none of it answered the three questions the customer, the card issuer and Harbor's own leadership asked next.
What did the customer actually ask for, in their words?
Why did the agent decide on twelve?
Has this happened to anyone else?
The protocol artifacts proved what was signed. They did not show how the agent got from a request for two to a cart of twelve. As the research summarised in our how-to on this topic points out, mandates are strong evidence for the facts they sign, and they do not show that the signed cart matched the request.
Harbor refunded the order. The cost was small. The discomfort was not: nobody could say whether this was a one-off or a pattern, and the team spent most of two weeks reading raw logs to find out.
Why the logs did not help
Harbor had logs. They were application logs: model calls, tool calls, latency, errors. They were spread across three services, retained for thirty days, and organised by request id, not by purchase.
To explain the twelve curtains, an engineer had to find the conversation, find the product search, find the listing, find the prompt version in use that day, and join them by timestamp. It took days, and nobody could prove the result had not been tidied up along the way.
The deeper problem was structure. Logs say what happened in order. They do not say what caused what, so every answer was a reconstruction, not a lookup.
What Harbor changed
The team decided to treat the purchase as a chain of linked events, with the protocol artifacts attached by reference. They used ZizkaDB as the audit layer, self hosted in a single Docker container at first.
They kept the change small and shipped it in a week.
Request. Record the customer's words and the structured constraints the agent extracted, so that interpretation errors are visible.
python
req = await db.log(agent="shopper-agent", event="purchase_request",
data={"text": "Reorder the two shower curtains for the guest bath",
"parsed": {"item": "shower curtain", "qty": 2},
"spend_cap": 120})
Protocol artifacts by reference. Store the mandate and cart references and their hashes, linked to the request. Never store card numbers or sensitive authentication data.
python
m = await db.log(agent="shopper-agent", event="mandate_issued",
data={"type": "intent", "ref": "mandate-ref", "sha256": ""},
parent_id=req.id)
Options observed, with trust tags. Every listing the agent read was logged with its source and a digest of the content, and anything from a seller was tagged untrusted.
Selection with alternatives. The agent logged what it chose, what it rejected and the reason it reported, along with the model and prompt versions.
Human approval where it matters. For first-time sellers and unusual quantities, a person approved, and the event recorded what the approval screen showed.
Payment and outcome. Payment references, delivery and any dispute were linked back to the chain.
What the next dispute looked like
Three weeks later a similar complaint arrived. This time the lead investigator ran one lineage query from the dispute back to the request.
The story came out in minutes. The customer had said two. The parsed request said two. The listing the agent selected sold curtains in a multipack, and its title said a set of 2 in the headline and twelve per carton in the structured data. The selection event showed the agent had read the structured field. No manipulation, no attack: an ambiguous listing and an agent that trusted one field over another.
That was the diagnosis. The record also showed something the team had not known to look for.
Using the record to find the pattern
With events linked, the team could ask questions that had been impractical before.
How many purchases had a quantity different from the parsed request? A simple query across the record answered it.
Which listings were behind them? The lineage pointed to a small set of multipack listings from two sellers.
Who was affected? The impact route listed every selection and payment that descended from those listings, which gave customer support a list to contact.
In this illustrative scenario, the review found a few dozen orders with a quantity mismatch over a quarter, nearly all from the same two sellers. Before the change the team would not have known there was a pattern at all.
The fixes
Each fix followed from what the record showed, and none needed a new model.
Pre-purchase check. Before payment, compare the cart quantity with the parsed request, and stop if they differ.
Clarifying question. When a listing is ambiguous about pack size, ask the customer before buying.
Corroboration rule. For first-time sellers, require a second source or a human approval.
Baseline watch. Use baseline() to compare weekly basket size and quantity mismatches against a reference period, so a drift shows up in days.
Replay test. Before changing the prompt or model, replay a set of past purchases through the new version and compare the selections.
Modeled results
These figures are illustrative, chosen to show what to measure, not what to expect.
Measure Before After (modeled)
Time to explain a disputed purchase Days of log reading Minutes by lineage query
Disputes with an answer on first review Few Most
Quantity mismatches reaching payment Unknown Caught by the pre-purchase check
Time to scope who else was affected Weeks Hours
The point is not the exact numbers. It is that questions which took days became questions that take minutes, and that questions nobody could answer became answerable.
What did not go perfectly
A case study without friction would not be believable. Here is what a team in Harbor's position should expect.
Instrumentation gaps. The first version missed the human approval screen contents. Disputes about what the customer saw could not be answered until they were added.
Stated reasons are not proof. The agent's reason for choosing twelve read plausibly, but it was the agent's own account. The team learned to rely on the linked inputs, the listing and the parsed request, and to treat the reason as supporting colour.
Privacy work took longer than the code. Deciding what to redact, how long to retain evidence and how to handle erasure requests involved legal and data protection, and that took more time than the instrumentation.
The record did not decide liability. It strengthened Harbor's position and shortened disputes, but who bears a loss still depends on contracts, network rules and law.
The open source edition records one agent per install. When Harbor added a second agent for returns, it moved to the Cloud edition.
Lessons you can reuse
Protocols prove the signature, a causal trail proves the story. You need both.
Record the request in the customer's words. Interpretation errors are among the most common disputes.
Tag what you did not write. Listings, reviews and seller text are untrusted until proven otherwise.
Link, do not just log. Lineage turns reconstruction into lookup.
Use the record before the dispute. Pre-purchase checks and baselines prevent the dispute that a trail can only explain.
Store references, never credentials. Keep payment data out of your audit layer.
Hold the chain head elsewhere. A record that the same team can edit proves less.
Replicate it in a week
Day 1: define the purchase events and agree with legal and payments what must never be stored.
Day 2: record requests, protocol artifact references and observed options with trust tags.
Day 3: record selections with alternatives, and approvals with what was shown.
Day 4: record payments and outcomes, and link disputes to payments.
Day 5: add the pre-purchase quantity and cap check and a first baseline.
Day 6: build the dispute pack and verify the chain, storing the head outside the database.
Day 7: replay a past dispute with someone who did not build the system, and time it.
Where ZizkaDB fits, and where it stops
ZizkaDB is an open source causal audit database for AI agents. It records events with parent links, answers why() for any decision, lists downstream effects through the impact route, supports session replay and drift baselines, and shows whether the recorded history has been altered through a hash chain whose head you store outside the database. It runs self hosted in one Docker container, with a managed Cloud edition at db.zizka.ai for multi-agent setups.
It does not replace the payment protocol, does not create network-recognised signatures, cannot tell you whether an agent was manipulated, and does not decide liability. It gives you the part the protocols leave open: an account of how the agent got from the request to the cart, that you can check.
If you run purchasing agents, start with one workflow and one mock dispute. If you can reconstruct the story in ten minutes, you are ahead of most. If you cannot, you have found the gap before a customer did.
Corrections: if you represent a party mentioned here and believe a statement is inaccurate, contact us and we will review it promptly.
Sources: the companion how-to, Payment Protocols Prove What Your AI Agent Signed, Not Why It Bought, and the sources listed there (Chargeflow, Worldpay, Swell, PYMNTS Intelligence via Yahoo Finance, arXiv 2610.17378, IETF draft-milan-agent-decision-commitment-00); ZizkaDB documentation.
Top comments (0)