{
  "markdown": "# agent-receipts\n\n[![npm](https://img.shields.io/npm/v/agent-receipts-mcp)](https://www.npmjs.com/package/agent-receipts-mcp)\n[![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n\n**Prove what your AI agents did.**\n\nOn **August 2, 2026**, the EU AI Act's record-keeping obligations for high-risk AI systems\nbecame enforceable: automatic event logging (Article 12), deployer log retention of at\nleast six months (Article 26), and penalties up to €15M or 3% of global turnover. The\nquestion your auditor, regulator, or counterparty will ask is simple:\n\n> *\"Your AI agent approved this. Prove exactly what it did — and prove nobody edited the record.\"*\n\nAn ordinary log file can't answer that: whoever owns the log can edit it. `agent-receipts`\ngives every consequential agent action a **cryptographically signed, timestamped receipt**\nthat anyone can verify offline — and exports **signed audit bundles** you can hand\ndirectly to a compliance officer.\n\n## What a receipt proves\n\n- **What happened, when** — action type, summary, actor, principal, ISO 8601 timestamp\n- **It hasn't been altered** — Ed25519 signature over canonical JSON; change one character\n  and verification fails\n- **Nothing was deleted** — receipts are hash-chained with monotonic sequence numbers per\n  vault; every audit export automatically flags gaps (deletions) and chain breaks\n- **Without exposing your data** — hash-only privacy: payloads are SHA-256 fingerprinted\n  and immediately discarded, never stored or transmitted\n\n## Built for the audit conversation\n\n`export_audit_bundle` produces what compliance actually needs: all receipts in a date\nrange, a tamper-evidence report (sequence gaps, chain breaks), the signing public key,\nand a manifest signature over the whole bundle. Retention is yours to control — the vault\nis a local SQLite file you keep as long as Article 26 (or your policy) requires.\n\n**You don't have to trust us.** Receipts verify **offline** against a pinned public key\nwith the bundled CLI — no account, no network call, no dependence on this service\nexisting tomorrow. That's what makes the evidence durable.\n\n## Quick start (MCP — local, free)\n\n```jsonc\n// Claude Desktop / Claude Code / any MCP client\n{\n  \"mcpServers\": {\n    \"agent-receipts\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agent-receipts-mcp\"],\n      \"env\": { \"AGENT_RECEIPTS_DATA\": \"<where-to-keep-the-vault>\" }\n    }\n  }\n}\n```\n\nRequires Node.js >= 22.13 (uses the built-in `node:sqlite` — zero native dependencies).\nPrefer one-click? Grab the `.mcpb` bundle from\n[Releases](https://github.com/dhanushs1912-svg/agent-receipts-mcp/releases) and open it\nwith Claude Desktop.\n\n| Tool | When an agent should call it |\n| --- | --- |\n| `issue_receipt` | Immediately after any consequential action. Returns the signed receipt. |\n| `verify_receipt` | Before trusting a receipt presented by another agent or system. |\n| `export_audit_bundle` | When a human asks for the audit trail of a date range. |\n| `get_service_info` | To fetch the public key worth pinning for offline verification. |\n\n## Quick start (HTTP API)\n\n```bash\nnpm install && npm run build\nnpm run serve        # http://localhost:8787\n```\n\n```bash\n# 1. Create a vault (returns your API key — shown once)\ncurl -X POST localhost:8787/v1/vaults -d '{\"name\":\"acme-compliance\"}'\n\n# 2. Issue a receipt after an agent action\ncurl -X POST localhost:8787/v1/receipts \\\n  -H \"Authorization: Bearer ark_...\" \\\n  -d '{\"action_type\":\"invoice.approved\",\"summary\":\"Approved INV-1042 for EUR 1,250\",\n       \"payload\":{\"invoice\":\"INV-1042\",\"amount\":1250},\"actor\":\"agent:ap-bot@acme\"}'\n\n# 3. Anyone can verify — no auth\ncurl -X POST localhost:8787/v1/verify -d '{\"receipt\":{...}}'\n\n# 4. Export a signed audit bundle for the compliance officer\ncurl \"localhost:8787/v1/export?from=2026-01-01\" -H \"Authorization: Bearer ark_...\"\n```\n\nService manifest for machine discovery: `GET /.well-known/agent-receipts.json`.\n\n## Offline verification\n\n```bash\nnpx -y -p agent-receipts-mcp agent-receipts-verify receipt.json --pubkey <base64-spki-der>\n# exit 0 = authentic, exit 1 = invalid/tampered\n```\n\n## Receipt format (`agent-receipts/v1`)\n\n```jsonc\n{\n  \"schema\": \"agent-receipts/v1\",\n  \"id\": \"rcpt_...\",\n  \"vault_id\": \"vlt_...\",\n  \"sequence\": 42,                      // monotonic per vault; gaps = deletion evidence\n  \"issued_at\": \"2026-07-15T12:34:56.789Z\",\n  \"action\": {\n    \"type\": \"invoice.approved\",\n    \"summary\": \"Approved invoice INV-1042 for EUR 1,250\",\n    \"actor\": \"agent:ap-bot@acme\",      // optional\n    \"principal\": \"acme-gmbh\",          // optional\n    \"context\": { \"jurisdiction\": \"EU\" } // optional\n  },\n  \"payload_hash\": \"sha256:...\",        // or null; contents never stored\n  \"prev_receipt_hash\": \"sha256:...\",   // hash chain to the previous receipt\n  \"key_id\": \"key_...\",\n  \"public_key\": \"<base64 SPKI DER>\",   // embedded for offline verification\n  \"signature\": \"<base64 Ed25519 over canonical JSON of everything above>\"\n}\n```\n\nCanonicalization is JCS-style: lexicographically sorted keys, no whitespace.\nThe JSON Schema lives at [docs/receipt.schema.json](docs/receipt.schema.json).\n\n## EU AI Act mapping (informational)\n\n| Obligation | How agent-receipts helps |\n| --- | --- |\n| Art. 12 — automatic event logging | `issue_receipt` on every consequential action; timestamps, actor, traceable chain |\n| Art. 26 — keep logs ≥ 6 months | Local vault you retain on your terms; signed `export_audit_bundle` for handover |\n| Traceability / integrity | Ed25519 signatures, hash chain, deletion detection, offline verification |\n\n**Not legal advice.** Whether your system is \"high-risk\" and what you must log is a\nquestion for your counsel. agent-receipts produces evidence infrastructure.\n\n## Status & roadmap\n\n- [x] Core: issue / verify / export with hash chain + Ed25519\n- [x] MCP stdio server + HTTP API + offline verifier CLI + MCPB bundle\n- [ ] Hosted vaults with per-receipt pricing\n- [ ] RFC 3161 / transparency-log timestamp anchoring\n- [ ] Key rotation and multi-key verification\n\nMIT License.\n",
  "bytes": 6039,
  "sha": "28cd57543017efb7b514f88305f706a80414216b7182a16a19474b0303351565",
  "repo_slug": "dhanushs1912-svg/agent-receipts-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_dhanushs1912_svg_agent_receipt_a842b73f/readme"
}