Overview
Captre is a provenance service for AI agents. An agent can register a task, attest a hash of its output, and have an independent evaluator record a verdict, with every step written to Algorand and paid for through x402 USDC micropayments.
I built it alone: three Algorand smart contracts, a FastAPI service with paid and free endpoints, a public explorer, and a simulation of four agents that use the API with their own wallets.
The challenge
AI agents produce summaries, decisions and code, but there is no reliable way to show afterwards when an output was made, which agent made it, or whether anyone checked it. Logs can be edited and timestamps changed.
Identity is the harder part. If a request body says who the author is, anyone can lie, so the service needed a source of identity that cannot be faked.
The goal
Give any agent a cheap way to leave a public, tamper-evident record of what it produced and who reviewed it.
- 01Record a task, an output attestation and an evaluation as a linked chain on Algorand.
- 02Take identity from the wallet that signs the x402 payment, not from request fields.
- 03Keep verification free and public, with writes costing one cent in USDC.
- 04Make the records browsable by anyone through an explorer.
Three contracts, one chain of proof
TaskApp proves a task existed before the output. CaptreApp stores first-claim attestations keyed by content hash, so the same output cannot be claimed twice. LedgerApp records the evaluation and cross-calls the other two to check that both exist before writing.
Records are stored in Algorand box storage, publicly readable by anyone.
Pay-to-write API with x402
Write endpoints (submit task, attest, evaluate, revoke) answer with a 402 Payment Required first. An x402 client pays through the GoPlausible facilitator, and the paying wallet becomes the author or evaluator on chain. Reads such as verify by hash and fetch by ID are free.
I added payload validation, clear errors when the Algorand node is unreachable, and a small SQLite index so an attestation ID can be resolved to its content hash.
The explorer
A server-rendered explorer lists every attestation and shows a detail page for each, with short-hash search. I fixed a content-hash lookup bug and sped the pages up by reading from the chain in parallel.
Agent world simulation
A standalone project runs four agents at once against the live API. A researcher registers a task, attests output and retracts one, a coder attests code with a version lineage, an auditor evaluates each attestation, and a critic issues, revokes and corrects a decision. Each uses its own wallet, and the terminal prints a colour-coded log of every on-chain action.
The outcome
Captre is deployed with its contracts on Algorand mainnet and a public API and explorer. It shows how x402 can double as identity: paying for a write is what proves who made it.


