xproof for AI Agents — Prove Before Act
xproof is the accountability layer for autonomous agents. Instead of being a black box, your agent becomes transparent, auditable, and verifiable. Anchor your reasoning (WHY) on-chain before executing — then anchor the actual result (WHAT) after. Full 4W audit trail on MultiversX. $0.01/proof. No API key needed via x402.
Quick Start — 30 seconds
1. Get a free key — two ways:
- From MCP directly (fastest): call
register_trialwith{"agent_name":"my-agent"}— returns apm_key instantly, no auth required. - Via REST:
POST https://provebeforeact.com/api/agent/register→{"agent_name":"my-agent"}
2. Add to Claude / Cursor / Codex / OpenClaw:
{ "mcpServers": { "xproof": { "url": "https://provebeforeact.com/mcp", "headers": { "Authorization": "Bearer pm_YOUR_KEY" } } } }
3. Call audit_agent_session before any action — get a proof_id — execute only after.
Note: always include Accept: application/json, text/event-stream in raw HTTP calls.
Why MCP + xProof?
- Native tool integration — Claude, Cursor, Codex, OpenClaw call
certify_fileoraudit_agent_sessiondirectly, no custom code needed - Prove Before Act enforced by the protocol —
audit_agent_sessionblocks execution until a proof_id is returned - x402 compatible — autonomous agents pay $0.01/proof via USDC on Base, no API key, no account, no human in the loop
- Immutable on-chain trail — SHA-256 hash anchored on MultiversX, verifiable without xproof
- Free trial — 10 free proofs, no wallet: call MCP tool
register_trial(no auth needed) orPOST https://provebeforeact.com/api/agent/registervia REST
Complete example — Reasoning → Hash → Certify → Act
import hashlib, json, requests
# 1. Document reasoning
reasoning = {"who": "my-agent", "what": "BUY BTC 0.5", "why": "RSI=38, below threshold"}
# 2. Hash locally — nothing leaves your machine
file_hash = hashlib.sha256(json.dumps(reasoning, sort_keys=True).encode()).hexdigest()
# 3. Certify via MCP before acting
resp = requests.post("https://provebeforeact.com/mcp",
headers={"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
"Authorization": "Bearer pm_YOUR_KEY"},
json={"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "certify_file",
"arguments": {"file_hash": file_hash, "filename": "decision.json",
"metadata": reasoning}}})
proof_id = json.loads(resp.json()["result"]["content"][0]["text"])["proof_id"]
# 4. Act — only after proof confirmed
execute_trade("BUY", "BTC", 0.5)
print(f"Audit trail: https://provebeforeact.com/proof/{proof_id}")
Fleet example — 1,000+ decisions/day
Running a fleet of agents (support, pricing, logistics)? Batch certifications instead of one call per decision.
import hashlib, json, requests
decisions = [...] # up to 100 decisions per batch call
batch = [{
"file_hash": hashlib.sha256(json.dumps(d, sort_keys=True).encode()).hexdigest(),
"filename": f"{d['agent_id']}_{d['session_id']}.json",
"metadata": d
} for d in decisions]
resp = requests.post("https://provebeforeact.com/api/batch",
headers={"Authorization": "Bearer pm_YOUR_KEY", "Content-Type": "application/json"},
json={"certifications": batch})
# → 1,000 decisions/day ≈ 10 batch calls instead of 1,000 single calls
# → each proof_id is independently verifiable at /proof/{id} for compliance audits
Same pattern works via MCP (certify_file per item) if your fleet already runs on an MCP client.
Available MCP Tools
| Tool | Auth | Description |
|---|---|---|
audit_agent_session | API key | Anchor WHO + WHAT + WHY before execution — the Prove Before Act tool |
certify_file | API key | Certify any SHA-256 hash on MultiversX |
certify_with_confidence | API key | Staged certification with confidence score (initial → partial → pre-commitment → final) |
verify_proof | none | Verify an existing certification by proof_id or file_hash |
get_proof | none | Retrieve a proof in JSON or Markdown format |
investigate_proof | API key or x402 | Full 4W audit trail reconstruction for a proof |
submit_outcome | API key | Record actual outcome against a confidence-anchored decision |
get_calibration | none | Query an agent's calibration quality (bias, gap, variance) |
check_attestations | none | Check third-party trust attestations for an agent wallet |
discover_services | none | Discover services and pricing |
Other integration methods
REST API
- Single proof —
POST /api/proofwithfile_hash+filename→proof_id - Batch (up to 100) —
POST /api/batch→ 50× fewer requests in production - Auth —
Authorization: Bearer pm_YOUR_KEY
x402 — no API key
POST /api/proof without a key → receive 402 → sign USDC on Base → resend with X-PAYMENT header. $0.01/proof, no account. Full x402 guide →
ACP — on-chain agent flow
3 calls: GET /api/acp/products → POST /api/acp/checkout → POST /api/acp/confirm
SDKs & frameworks
- Python:
pip install xproof— LangChain, CrewAI, AutoGen, LlamaIndex, OpenAI Agents SDK - JavaScript:
npm install @xproof/xproof— Vercel AI, LangChain JS
Guarantees & links
- Privacy-first — only SHA-256 hash on-chain, raw content stays local
- Immutable — anchored on MultiversX, verifiable without xproof
- $0.01 flat per proof, no tiers
Full agent guide · agent-context.md (machine-readable) · mcp.json · openapi.json · llms.txt