Your agent just paid an unfamiliar API because its pricing page said $0.001 per call. Tomorrow the page says $0.10, and the seller says it always did. What does your agent have? A log line it wrote itself. Self-serving evidence. The counterparty can say you made it up, and nobody can tell either way.
This post shows a way out that works for software, not just for lawyers: a neutral third party fetches the URL, records exactly what it got, signs it, and anchors a fingerprint on a public blockchain. The result is a certificate anyone can verify later without trusting you, the counterparty, or the witness. It costs two cents and one HTTP round-trip.
I'll walk through a real certificate byte by byte, show the two-line verification, and be clear about what this does not prove.
The problem, stated precisely
An agent can compute anything, but it can witness nothing about the outside world on its own authority. Whatever it records about what a page said is a claim made by an interested party. Screenshots are trivially edited. archive.org is a public good, not an API contract, and it does not sign anything. Your own logs are yours.
Three properties make evidence useful later:
- Independence — someone other than the interested party fetched the content.
- Integrity — the record cannot be altered after the fact without detection.
- Time — the record provably existed at (or before) a certain moment.
Independence needs a third party. Integrity and time can come from a hash in a public ledger. Together: a notary for HTTP responses.
The flow
agent ──POST /api/witness {url}──▶ witnessd ──GET url──▶ the page ◀── 201 {id, certificate} ──┘ (fetches it itself) hourly: Merkle root → Base chain anyone ──GET /api/certificate/{id}──▶ certificate (free, forever) Call it before you act. A snapshot taken after a dispute starts proves much less than one taken before you paid.
Calling it
Plain HTTP, no account, no API key. Payment is x402: the first request gets a 402 Payment Required with an invoice in the Payment-Required header; an x402 client signs a USDC authorization (on Base; the buyer pays no gas) and retries.
// Any x402-capable HTTP client works. With Coinbase's x402-fetch + viem: import { wrapFetchWithPayment } from "x402-fetch"; import { privateKeyToAccount } from "viem/accounts"; const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); // small dedicated wallet, a few USDC on Base const payFetch = wrapFetchWithPayment(fetch, account); const res = await payFetch("https://witnessd.vip/api/witness", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ url: "https://api.coinbase.com/v2/prices/BTC-USD/spot" }), }); console.log(await res.json()); Response:
{ "id": "ws_aa0670da7aede610de339dcd", "certificate_url": "https://witnessd.vip/api/certificate/ws_aa0670da7aede610de339dcd", "retrieve_url": "https://witnessd.vip/api/retrieve/ws_aa0670da7aede610de339dcd" } Or give the agent the tool instead of the curl:
{ "mcpServers": { "witnessd": { "command": "npx", "args": ["-y", "witnessd-mcp"], "env": { "EVM_PRIVATE_KEY": "0x… a small dedicated wallet with a few USDC on Base" } }}} Claude Code users: /plugin install witnessd --marketplace jschunter/witnessd-mcp installs the MCP server plus a skill that tells the agent when a witness is worth two cents (before paying an unfamiliar seller, before acting on third-party data, when asked to "prove this") and caps spending at 5 paid calls per task.
The certificate, byte by byte
This is a real one: GET https://witnessd.vip/api/certificate/ws_aa0670da7aede610de339dcd (free). Trimmed only in the headers block.
{ "format": "witnessd-certificate-v1", "manifest": { "v": 1, "id": "ws_aa0670da7aede610de339dcd", "url": "https://api.coinbase.com/v2/prices/BTC-USD/spot", "final_url": "https://api.coinbase.com/v2/prices/BTC-USD/spot", "redirects": [], "fetched_at": "2026-09-07T21:53:26.072Z", "status": 200, "headers": { "date": "Mon, 07 Sep 2026 21:53:26 GMT", "content-type": "application/json", "content-length": "60", "server": "cloudflare", "cf-ray": "a378f239de0ef719-CDG", "…": "…" }, "content_type": "application/json", "body_sha256": "acaf08d9c2a7545b5ce6e5bdc5c7a4eeb46d986b8aff273125b6cc8b10f85642", "body_bytes": 60, "tls": null, "witness": { "service": "https://witnessd.vip", "pubkey_spki_b64": "MCowBQYDK2VwAyEAZUvBUcCNcjFt+ObLt92y28xruA6Y4GcpGCNaHM+6yq8=", "alg": "ed25519", "leaf": "sha256(canonical-json(manifest))" } }, "leaf_hash": "40933f7c91648be70b6a17d9457e79baeeadfa2e6f15e1e953039ffab2502ee7", "signature_ed25519_b64": "zcNHd/aRZQPj/5qBnROM/NWvAdEg+1gW8WfA728Aiandm+EHLatGObysej+npeggjzE6qlQwyQCc1mynHcVCAQ==", "anchor": { "batch_id": 12, "merkle_root": "40933f7c91648be70b6a17d9457e79baeeadfa2e6f15e1e953039ffab2502ee7", "count": 1, "chain": "base", "tx_hash": "0xa770fffa3c4eec01d400a8e251d91427dcbb99a9d4abf42e8d4a8b74049e6027", "anchored_at": "2026-09-07T22:24:01.717Z", "leaf_index": 0, "proof": [], "calldata_format": "0x77746e7331<merkle_root>" } } Reading it top to bottom:
-
manifestis the witnessed fact: which URL, fetched when, what HTTP status, the response headers the witness received, and the SHA-256 of the 60-byte body ({"data":{"amount":"79175.98","base":"BTC","currency":"USD"}}). The body itself is archived and available to any paying party viaretrieve_url; the certificate carries only its hash, so certificates can be public without republishing content. -
leaf_hash= SHA-256 of the manifest serialized as canonical JSON (keys sorted, no whitespace). Change one byte of the manifest and this changes. -
signature_ed25519_b64is the witness's Ed25519 signature over the leaf hash, with the public key embedded in the manifest. This binds the record to the service that made it. -
anchoris the time proof. Every hour, witnessd folds all new leaf hashes into a Merkle tree and writes the root into a transaction on Base. This batch happened to contain one snapshot, so the Merkle root is the leaf hash andproofis empty — a convenient teaching case. In a busier hourproofholds the sibling hashes that fold the leaf up to the root. -
tx_hashis a public Base transaction whose input data is the ASCII tagwtns1(0x77746e7331) followed by the root. That transaction was mined at 22:24 UTC, so the manifest provably existed by then, 31 minutes after the fetch.
Verifying it yourself (no trust required)
curl -s https://witnessd.vip/api/certificate/ws_aa0670da7aede610de339dcd > witness.json curl -s https://witnessd.vip/verify.js > verify.js # ~100 lines, no dependencies node verify.js witness.json You should see PASS for the leaf hash, the signature, and the Merkle fold, then a line telling you which Base transaction to look up. Open 0xa770fffa…049e6027 on any Base block explorer and compare its input data to 0x77746e7331 + the root. That last step is the one that does not depend on witnessd at all.
By hand, in Node:
import { createHash } from "node:crypto"; const c = JSON.parse(await (await fetch("https://witnessd.vip/api/certificate/ws_aa0670da7aede610de339dcd")).text()); const canon = o => Array.isArray(o) ? `[${o.map(canon)}]` : o && typeof o === "object" ? `{${Object.keys(o).sort().map(k => `${JSON.stringify(k)}:${canon(o[k])}`)}}` : JSON.stringify(o); const leaf = createHash("sha256").update(canon(c.manifest)).digest("hex"); console.log(leaf === c.leaf_hash); // true What it proves — and what it doesn't
A valid certificate proves: witnessd's server received exactly these bytes from that URL at that time, and the record has not changed since the anchor transaction was mined.
It does not prove:
- that the content is true — only that it was served;
- that every visitor saw the same thing (pages vary by region, user agent, A/B test, login state);
- that a court will accept it — this is cryptographic evidence, not a qualified timestamp under eIDAS or a notarization under any statute.
Scope limits, by design: public content only (no logins — the witness would just capture the login page), no private networks, bodies up to 10 MB, robots.txt respected for scheduled watches.
Why a separate service instead of doing it yourself
You can hash and timestamp your own fetches, and for your own records you should. But the moment the question is "who says?", a record you produced answers "I do". The useful property is that the fetching party has no stake in the outcome. That is also why the certificate and the archived body are decoupled: certificates are public and free to verify forever; the body goes to whoever pays the 5-cent retrieval — including your counterparty, an auditor, or an arbitrator you never met.
Where this is useful right now
- Agent-to-agent commerce: witness the seller's offer URL before paying; attach the snapshot id to the payment memo.
- Acting on third-party data: price feeds, FX rates, inventory, model-API outputs. If a downstream decision could be audited, witness the input.
- Terms and policies: anything you accepted by continuing to use it. Witness it the day you rely on it.
- "Show me": when a user asks an agent to archive, prove, or preserve a page.
Links
- Service and docs: https://witnessd.vip · openapi.json · llms.txt
- MCP server + Agent Skill + Claude Code plugin: https://github.com/jschunter/witnessd-mcp
- Certificate format as an open spec: https://github.com/jschunter/web-evidence-receipt
- Prices: $0.02 witness, $0.05 retrieve archived body, certificates free. USDC on Base via x402, or a $1 prepaid key.
witnessd is a small independent service. Verify the certificate above yourself before you believe anything in this post — that is the point.