Skip to main content

See a Receipt with zero setup

No install needed — replay a bundled fixture run through the real assembler:
sample runs the same deterministic (events, template) → receipt core a live run uses; the only difference is that the events come from a bundled fixture instead of a recorder. The fixture holds three operations, so one command shows the whole model — a FULL receipt, a PARTIAL one with an explained gap, and one carrying an observed fault:
That gap — payment ✓ but settlement ✗ — is the product: your agent signed and sent the money, and nothing on your side witnessed what became of it. A log viewer shows a request with no answer; only the Receipt states the absence and what exactly is missing. sample takes any shipped template, so you can see the same model from another vantage point — sample x402-seller, sample x402-facilitator, or the longer sample escrow-arc. Run npx @usehaia/trace-cli template list for the set.

Install the CLI

Both expose the haia-trace command. Requires Node ≥ 22.

Record your own run

A Receipt needs events. Attach the capture adapter to the side of the payment you own — here an x402 client — and point it at .trace/events, the directory haia-trace build reads:
That is the whole integration. Capture is passive: it observes a payment, never steers one, and payloads are built from an allowlist, so no signature or key ever reaches the run file. The same call attaches to a resource server or a facilitator — see Connect x402. Paying on Circle rather than through the x402 SDK? @usehaia/trace-circle records verified webhook v2 deliveries into the same directory.

Assemble the receipts

With a run at .trace/events/<run>.ndjson, build one Receipt per operation:
build groups events by context_id and writes each receipt to .trace/receipts/. Re-building the same run yields a byte-identical receipt.

Next steps

See a real agent traced

A buyer agent pays twice, and stops itself on the operation that stayed open.

What a Receipt is

The model behind the verdict: stages, evidence, missing, exceptions.

Connect x402

Record the x402 lifecycle from your own app.

CLI reference

Every command, flag, and the .trace/ layout.