How do I add AER-1 receipts to a Pydantic AI agent?

Install the aer1-pydantic adapter, mint an AER-1 receipt where each tool call and final result completes, and verify the wiring against the kit's conformance vectors before you rely on it. Typed outputs pair naturally with receipts: the schema proves the shape, the receipt proves the run.

Last updated: 2026-10-17

Pydantic AI agents are built around structured results, which makes their evidence question precise: a result can be perfectly typed and still unattributed, with no checkable link to the run, the tool calls, or the inputs that produced it. The adapter closes that gap at the framework's own seams: each selected tool call and the final result mint a receipt committing to the caller, the tool, the output, and the side effects (AER-1, IETF Internet-draft-zambo-aer1-21; kit version 1.5.4).

One byte-level rule matters extra in typed systems: where an input or output is a JSON object, the canonical payload's member ordering must follow the layout your implementation publishes, per the draft's requirement, or independent verification of that receipt fails. The kit's vectors include object-input cases for exactly this reason; treat the vector gate as part of the type discipline, not as packaging.

Selection guidance mirrors the other quickstarts: mint at state-changing tool calls, external calls, and delivered results first. Dependency-injected tools that touch money, messages, or records are the highest-value minting points in most Pydantic AI systems, because those are the steps a reviewer, a client, or an incident will ask about by name.

Quickstart: AER-1 receipts for Pydantic AI agents

1. Install: pip install aer1-pydantic. 2. Attach the adapter where the agent and its tools are defined. 3. Select minting points: tool calls with side effects, external calls, final results delivered to anyone. 4. Run one task with an object-shaped tool input. 5. Verify: the kit's conformance vectors pass, including the object-input cases; one live receipt checks at https://zambo.dev/verify/ . 6. Runbook entry: package version, kit 1.5.4, the member-ordering layout you publish, minting-point rule.

Worked example

The shared anchor is the kit fixture receipt 130da435-e157-498e-af90-605866a86a27. Independent implementations reproduce its verification from the draft text alone; a Pydantic AI integration passing the same vectors is producing receipts those independent checkers will accept, which is the whole point of a published format.

Frequently asked questions

Does validation make receipts redundant?

Validation proves a result matches a schema at the moment of the check. A receipt proves which run produced that result and that the saved result has not changed since. Systems that act on their outputs need the second property as much as the first.

Where do receipts live in a typed codebase?

Beside the run records your system already keeps, keyed by run and step. AER-1 is a storage-agnostic format; the kit mints, your infrastructure stores, and any conforming checker verifies.

What is the most common Pydantic-specific pitfall?

Serialising an object input in a different member order than the one your published layout states. The receipt then commits to different bytes than a checker reconstructs. The vector suite's object cases exist to catch it in your build, not in production.

By Brennan Zambo, founder of Zambo.

Last verified: 2026-10-17.

Attach the adapter and pass the object-input vectors: https://zambo.dev/mcp .

Try a handover

A handover gives your client one proof link with verifiable receipts to review, then Accept or Flag.

try it: say 'use zambo to hand this over to <client>' in your ai

Add Zambo · Handover docs · Real public handover · AER-1