This document defines version 1.0 of the Agent Action Receipt (AAR) format. It is written in an RFC-style profile intended for direct implementation.
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL are to be interpreted as described in RFC 2119.
Agent Action Receipt (AAR) is a lightweight, cryptographically signed receipt format for AI agent actions. AAR enables verifiable audit trails for agent-to-agent commerce, regulatory compliance, and dispute resolution. The format is transport-agnostic, deterministic under canonical serialization, and suitable for machine verification.
As AI agents perform autonomous actions (API calls, payments, content generation, trades), stakeholders require verifiable evidence of what occurred, who initiated it, when it happened, and what it cost. Existing approaches are ad hoc and platform-specific, which prevents cross-platform auditing and weakens evidentiary integrity. AAR provides a common format and verification procedure so independent parties can validate receipts without trusted intermediaries.
- Agent commerce (x402/payment verification): bind payment evidence and action execution in one signed artifact.
- Trading signal provenance: prove origin and timing of strategy outputs used for execution.
- Content generation audit trails: attest model runs, prompts (by hash), and outputs (by hash).
- Enterprise compliance exports: produce machine-verifiable records for governance and regulators.
- Multi-agent workflow accountability: track handoffs and responsibility across agent graphs.
x402 is a complementary standard for payment flow semantics; AAR complements x402 by adding cryptographic action attestations.
- A receipt is a UTF-8 JSON object.
- Canonical form for signing MUST use canonical JSON serialization (Section 5).
An AAR receipt object MUST include the following fields:
receiptId(string): globally unique identifier (UUID format RECOMMENDED).agent(object): identity of the acting agent.principal(object): identity of the principal on whose behalf the action was performed.action(object): action type, target, method, and result status.scope(object): authorization/payment scope and constraints.inputHash(object): hash of canonicalized or normalized input payload.outputHash(object): hash of canonicalized or normalized output payload.timestamp(string): action completion timestamp in RFC 3339 format.cost(object): execution and/or payment accounting.signature(object): signature metadata and detached signature bytes.metadata(object): extension bag for protocol-specific attributes.
id(string, REQUIRED): stable agent identifier (DID, URI, or vendor namespace).name(string, OPTIONAL): human-readable name.version(string, OPTIONAL): agent/runtime version.publicKey(string, OPTIONAL): base64url Ed25519 public key if not resolved bysignature.kid.
id(string, REQUIRED): principal identifier (user, org, service account).type(string, REQUIRED): e.g.,user,organization,service.
type(string, REQUIRED): semantic action label, e.g.,api.call,trade.signal,content.generate.target(string, REQUIRED): target resource URI, route, or contract identifier.method(string, OPTIONAL): operation verb such asGET,POST,EXECUTE.status(string, REQUIRED): terminal action status (success,failure,partial).
permissions(array of string, REQUIRED): grants used by the action.constraints(object, OPTIONAL): limits such as region, budget, or model policy.x402(object, OPTIONAL): payment attributes when x402 is used.
alg(string, REQUIRED): hash algorithm (sha256RECOMMENDED).digest(string, REQUIRED): base64url-encoded digest bytes.
Raw sensitive inputs/outputs SHOULD NOT be embedded in receipt content; hashes SHOULD be used for privacy and minimization.
amount(string, REQUIRED): decimal string to avoid floating-point ambiguity.currency(string, REQUIRED): ISO 4217 code or protocol-specific token symbol.unit(string, OPTIONAL): e.g.,request,token,execution.payer(string, OPTIONAL): actor funding the action.
alg(string, REQUIRED): MUST beEd25519for AAR v1.0.kid(string, REQUIRED): key identifier resolvable to a trusted public key.publicKey(string, OPTIONAL): base64url Ed25519 public key; MAY be omitted when resolver is available.canonicalization(string, REQUIRED): MUST beJCS-SORTED-UTF8-NOWS.sig(string, REQUIRED): base64url detached signature over canonical bytes.
Array of external evidence bundle references. Each entry is a hash pointer to an independently verifiable proof artifact that provides deeper audit coverage beneath the receipt layer.
type(string, REQUIRED): evidence bundle type identifier (e.g.,aelitium/binding-bundle,ai-decision-tracer/audit-trail,insumer/attestation,scc/certificate-chain).hash(object, REQUIRED): content hash of the referenced artifact, using the samehashObjectformat asinputHash/outputHash.uri(string, OPTIONAL): retrieval URI for the evidence bundle (HTTPS, IPFS, Arweave, or other content-addressable store).issuer(string, OPTIONAL): identifier of the entity that produced the evidence.
Evidence references enable layered trust: the receipt proves what the agent did, while referenced bundles can prove what the model returned (LLM call bindings), that state transitions were valid (coordination proofs), or that the agent's identity is attested (on-chain credentials). Each layer is independently verifiable.
Verifiers MAY fetch and validate evidence bundles; verification of the receipt itself MUST NOT depend on evidence bundle availability.
Opaque extension object. Producers MAY include protocol-specific fields (e.g., x402 payment reference, model/provider tags, trace IDs). Unknown fields MUST be ignored by verifiers unless local policy requires them.
The authoritative JSON Schema for AAR v1.0 is provided at:
schema/receipt.json
Implementations SHOULD validate against that schema before signature verification.
AAR v1.0 uses Ed25519 with canonical JSON serialization.
Canonicalization algorithm identifier: JCS-SORTED-UTF8-NOWS.
The signing payload MUST be created as follows:
- Start from the full receipt object.
- Replace
signature.sigwith an empty string ("") or remove it from the canonicalized payload; this specification uses removal. - Recursively sort all object keys lexicographically (Unicode code point order).
- Emit JSON with no insignificant whitespace.
- Encode as UTF-8 bytes.
- Compute canonical payload bytes (Section 5.1).
- Sign bytes with Ed25519 private key selected by
signature.kid. - Base64url-encode signature bytes without padding.
- Place result into
signature.sig.
Verifier procedure:
- Parse JSON and validate required fields.
- Ensure
signature.alg == "Ed25519"andsignature.canonicalization == "JCS-SORTED-UTF8-NOWS". - Resolve public key in this order:
signature.publicKeyif present.agent.publicKeyif present.- Resolver lookup by
signature.kid(implementation-specific trust store).
- Rebuild canonical payload from receipt with
signature.sigremoved. - Base64url-decode
signature.sigand public key. - Verify Ed25519 signature over canonical payload bytes.
- Evaluate policy checks:
- receipt freshness and expiration,
- replay detection (
receiptIduniqueness), - scope/permission conformance,
- optional input/output hash recomputation when raw artifacts are available.
Verification result SHOULD include boolean validity plus explicit failure reason.
A receipt MAY be transported in either of the following ways:
-
HTTP header
- Header name:
X-Agent-Receipt - Value: base64url-encoded UTF-8 JSON receipt.
- Header name:
-
HTTP response body
- Field name:
receipt - Value: raw JSON object receipt.
- Field name:
If both are present, they MUST be byte-equivalent after decoding/parsing; mismatch MUST be treated as an error.
Services advertising AAR support SHOULD expose:
/.well-known/trust-layer
Example capability document:
{
"agentActionReceipt": {
"version": "1.0",
"algorithms": ["Ed25519"],
"canonicalization": "JCS-SORTED-UTF8-NOWS",
"transport": ["X-Agent-Receipt", "body.receipt"],
"schema": "https://example.com/schemas/aar/v1/receipt.json",
"jwks": "https://example.com/.well-known/jwks.json"
}
}- Key rotation:
kidMUST support rotation; verifiers SHOULD retain historical keys for signature validity windows. - Replay protection: consumers SHOULD enforce uniqueness of
receiptIdand bounded timestamp skew. - Privacy: include hashes of sensitive inputs/outputs, not raw payloads, unless policy explicitly requires retention.
- Receipt expiration: implementations SHOULD define TTL policy and reject stale receipts outside allowed windows.
- Trust anchors: verification is only as strong as key distribution; use authenticated key discovery (e.g., pinned JWKS, DID method policies).
- Canonicalization safety: signing and verifying code MUST use identical canonicalization behavior; divergence invalidates signatures.
Reference implementation target: BotIndex (king-backend).
Repository/path integration is implementation-specific; this specification defines interoperability requirements independent of runtime framework.
- Andrew Glaz (@cyber_weasel)
MIT License. See LICENSE.
npm install botindex-aar- npm: https://www.npmjs.com/package/botindex-aar
- Source: https://github.com/Cyberweasel777/King-Backend
pip install botindex-aar- PyPI: https://pypi.org/project/botindex-aar/
- Source: https://github.com/Cyberweasel777/botindex-aar-python
Zero-knowledge proof circuit for on-chain receipt verification.
SCC extends AAR to cover identity continuity across sessions. While AAR proves what an agent did, SCC proves the agent acting today is the same continuous agent that was granted authority previously.
Key features:
- Merkle tree over memory and capabilities — enables selective disclosure
- Chain validation — cryptographic linkage between sessions with gap detection
- Drift detection — signals when capabilities or memory mutate between sessions
- SR 11-7 compliant — capability lineage DAG for regulatory audit
Full spec: SCC.md
npm install botindex-aar@1.1.0 # TypeScript SCC support includedCo-developed with @botbotfromuk from FINOS ai-governance-framework.
- Landing: https://aar.botindex.dev
- Live API (reference implementation): https://api.botindex.dev
- MCP Server: https://www.npmjs.com/package/botindex-mcp-server