DEV Community

Cover image for What does a verifiable AI receipt contain? A real receipt, field by field
rambo
rambo

Posted on Edited on

What does a verifiable AI receipt contain? A real receipt, field by field

What does a verifiable AI receipt contain? A real receipt, field by field

Your agent says the work is done. A week later, a client asks a simple question: is this the result the agent actually produced, or has it been edited, regenerated, or quietly swapped since? A screenshot cannot answer that. A chat transcript cannot answer it either, because both can be changed after the fact without leaving a mark.

A verifiable receipt is built to answer exactly that one question, and no more than that one question. This article takes one real receipt apart, field by field, and recomputes its hash in front of you, so you can see what each field proves and where the proof stops.

Brennan Zambo created agent execution receipts, Zambo is the origin product, and AER-1 is the defining standard. The receipt below follows AER-1, currently draft-zambo-aer1-26, and every field name in this article comes from that draft or from the live record itself.

The receipt we are dissecting

Open the JSON in another tab and follow along. Nothing in this article requires you to trust the summary here, because the point of the format is that you can check each claim against the record.

Field 1: id

"id": "5f1fe2f1-2474-463d-828d-cb47e229bf34"
Enter fullscreen mode Exit fullscreen mode

The id is the receipt name. It builds the public URL above, and it is how you, a client, or another agent refers to this exact record.

Here is the part most summaries get wrong: the id is a label, and it sits outside the committed payload. AER-1 Section 6 states it plainly: the output commitment covers the canonical bytes, the receipt id does not appear in those bytes, and no verification step recomputes it. So a verifier proves the id belongs to the bytes only by comparing it against an expected id from an independent source, or by resolving the id and confirming that the resolved record carries the same output_hash. In this article you are doing the second one: you arrived with the id, you resolved it, and the record you got back carries the output_hash shown below.

Field 2: canonical_bytes, the saved result itself

"canonical_bytes": "eyJjYWxsZXIiOnsiaWQiOiJzaGEyNTY6Y2FmOGYyODcw...",
"canonical_byte_length": 2798,
"canonical_bytes_withheld_for_privacy": false
Enter fullscreen mode Exit fullscreen mode

canonical_bytes is a base64 encoding of the exact UTF-8 bytes that were hashed for the output commitment. Decode it and you get a JSON object with the caller, the tool, the schema version, the side effects declaration, and the output itself, in this case the text the write tool produced.

Two details matter:

  • The bytes are carried explicitly instead of being reconstructed later from a summary. If the bytes changed by even one character, the hash in the next field would change with them.
  • result_preview, which also appears in the record, is marked "display_only_not_committed". The preview is for reading convenience. The committed thing is canonical_bytes, and only canonical_bytes.

Field 3: output_hash, the commitment

"output_hash": "sha256:dcd6458bd45d68fed6547718ee5ccb2ace0ecab33864f9b9285601e42f8415e8",
"hash_algorithm": "sha256"
Enter fullscreen mode Exit fullscreen mode

output_hash is "sha256:" plus the lowercase hex SHA-256 digest of the decoded canonical_bytes. That is the AER-1 Table 1 definition, word for word in substance: the digest of the decoded bytes, not of the base64 text, and not of a re-serialized version of the JSON.

Recompute it yourself

I recomputed this receipt on November 18, 2026, before writing this article. The steps are the whole verification procedure in miniature:

import base64, hashlib, requests

url = "https://zambo.dev/api/receipts/5f1fe2f1-2474-463d-828d-cb47e229bf34"
receipt = requests.get(url, timeout=30).json()

raw = base64.b64decode(receipt["canonical_bytes"])
print(len(raw))                                        # 2798
print("sha256:" + hashlib.sha256(raw).hexdigest())     # sha256:dcd6458b...
print(hashlib.sha256(raw).hexdigest() ==
      receipt["output_hash"].removeprefix("sha256:"))  # True
Enter fullscreen mode Exit fullscreen mode

The decoded length came out at 2798 bytes, matching canonical_byte_length in the record. The recomputed digest matched output_hash exactly. That is what the record means by its first check, commitment_matches, described in the checks block as: "The exact decoded canonical bytes match the stored SHA-256 output hash."

If you run the same code next month and get a different digest, the saved result has changed. If you get the same digest, it has not. There is no account, wallet, or token involved in that check: AER-1 requires every receipt to be retrievable at a stable public URL without one.

Field 4: metadata_hash and the Section 3.1 block

"metadata_hash": "sha256:daa122586412c5a0628976ae3af6700b84b098707ad12789f5ca5bd3b01ea149"
Enter fullscreen mode Exit fullscreen mode

The output commitment alone binds the result bytes. It does not, by itself, bind the context around the result: which receipt this is, when it was created, which tool ran, and what provenance was claimed. That binding is the job of metadata_hash, required when receipt_schema_version is "0.4" or later.

AER-1 Section 3.1 defines the canonical metadata block as a JSON object with exactly these members: created_at, id, output_hash, provenance_class, receipt_schema_version, and tool, where tool carries exactly name, scope, and version. The block is serialized with member names sorted at every level and no whitespace outside strings, and metadata_hash is "sha256:" plus the digest of that block.

For this receipt, the block is:

{"created_at":"2026-11-18T09:30:31.955Z","id":"5f1fe2f1-2474-463d-828d-cb47e229bf34","output_hash":"sha256:dcd6458bd45d68fed6547718ee5ccb2ace0ecab33864f9b9285601e42f8415e8","provenance_class":"EXECUTED BY ZAMBO","receipt_schema_version":"0.4","tool":{"name":"write","scope":"public","version":"4.1.4"}}
Enter fullscreen mode Exit fullscreen mode

I hashed that exact string as well. It produces sha256:daa122586412c5a0628976ae3af6700b84b098707ad12789f5ca5bd3b01ea149, matching metadata_hash in the record, which is why the checks block reports metadata_binding as a pass. The draft says that in so many words: because the block includes the id and the output_hash, a metadata_hash copied from a different receipt does not verify against this one. Change the id and the metadata block changes with it, so the recomputed metadata_hash no longer matches.

Field 5: input_hash

"input_hash": "sha256:ff4b733f78f6658380709901d5f5fa983444b4a59519604a8a3827d632aa2b7f",
"input_hash_layout": "zambo-json-sorted-keys-utf8-v1"
Enter fullscreen mode Exit fullscreen mode

input_hash commits to what the tool was asked to do, under the named layout in input_hash_layout. It is optional in AER-1 and sits outside the metadata_hash computation, so its absence in another receipt is not evidence of tampering. Its value here is practical: paired with output_hash, it lets a checker confirm that a given output answers a given input, instead of trusting a job summary that pairs them by assertion.

Field 6: steps and provenance_class

"steps": [
  {"tool": "write", "status": "success",
   "started_at": "2026-11-18T09:30:27.178Z",
   "completed_at": "2026-11-18T09:30:31.955Z"}
],
"provenance_class": "EXECUTED BY ZAMBO"
Enter fullscreen mode Exit fullscreen mode

The steps array records what ran, whether it succeeded, and when it started and finished. Here there is one step, the write call, taking about 4.8 seconds from start to completion.

provenance_class states how the result came to exist, using one of the classes AER-1 Section 5 defines. "EXECUTED BY ZAMBO" means the system claiming the receipt also executed the work. That is a claim bound by metadata_hash, so swapping the label on this record breaks the metadata check. It is still a claim, not an authentication: the checks block on this very receipt is careful to say, under provenance_binding, that the claim is consistent with the verified bytes and that the issuer is not authenticated.

Field 7: verification_status and the checks block

"verification_status": "commitment_matches"
Enter fullscreen mode Exit fullscreen mode

The hosted record carries a detailed checks block, and reading it honestly is the best short course in what verification means:

  • commitment_matches: pass. The decoded canonical bytes match output_hash.
  • canonical_payload_matches: pass. The stored output and known call context reconstruct the exact canonical bytes.
  • metadata_binding: pass. metadata_hash matches the Section 3.1 block.
  • provenance_binding: pass, with the caution above about issuer authentication.
  • Stored timestamp: pass, with the note that immutability was not checked.
  • Three items are explicitly not checked on this record: any Ed25519 signature, any append-only receipt chain proof, and issuer authentication. The record says "not checked" in plain text instead of implying coverage it does not have.

That honesty is part of the format. AER-1 separates the outcomes a verifier can report, and a reader should know all five shapes before trusting any one of them:

  1. verified: the verifier evaluated the anchor and the anchor verifies under the procedure that applies to it.
  2. verification failed: the verifier evaluated the anchor and a recomputed or stored value does not match what was committed.
  3. rejected: unresolvable record: the verifier evaluated the anchor and the anchor's record could not be resolved. A rejection is not a failure, because the record may verify under different conditions.
  4. not checked: an anchor is present and the verifier did not evaluate it. No evaluation was attempted, so it records no claim about whether the anchor would verify.
  5. absent: no anchor is present for the verifier to evaluate.

Collapsing those five into a single green checkmark would hide exactly the information a client dispute turns on.

What this receipt proves, and what it does not

Proved, by recomputation you can repeat:

  • The saved result in canonical_bytes is the result that output_hash commits to. It was not changed after it was saved.
  • The metadata context, id, creation time, tool, schema version, and provenance class, is the context metadata_hash commits to for this receipt.
  • The input that input_hash commits to is the input recorded for this job, under its named layout.

Not proved, and never claimed by the format:

  • That the result was right. A receipt proves the saved result was not changed. It never proves the answer was correct, complete, or wise. Correctness is your review, your tests, and your client sign-off.
  • That the issuer is who it says it is, on this record. Issuer authentication was not checked, and the record says so.
  • That the timestamp is immutable, or that a chain proof exists. Both are marked not checked here.

Use it on your next delivery

Next time an agent hands you work, ask for the receipt id before you argue about the content. Resolve it at https://zambo.dev/run/ followed by the id, decode canonical_bytes, recompute the hash, and recompute the Section 3.1 metadata block if the schema is 0.4 or later. Two hashes, a few lines of code, and the argument changes from "trust me, this is what it produced" to a check either of you can run and repeat. That is what a verifiable receipt contains: not a promise, but the bytes, the commitments, and the stated limits, all in one public record.

Checked a receipt and want your own agent's work saved the same way? The Day Pass is $0.99 for unlimited use for 24 hours.

Top comments (0)