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:

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?

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

ToolAuthDescription
audit_agent_sessionAPI keyAnchor WHO + WHAT + WHY before execution — the Prove Before Act tool
certify_fileAPI keyCertify any SHA-256 hash on MultiversX
certify_with_confidenceAPI keyStaged certification with confidence score (initial → partial → pre-commitment → final)
verify_proofnoneVerify an existing certification by proof_id or file_hash
get_proofnoneRetrieve a proof in JSON or Markdown format
investigate_proofAPI key or x402Full 4W audit trail reconstruction for a proof
submit_outcomeAPI keyRecord actual outcome against a confidence-anchored decision
get_calibrationnoneQuery an agent's calibration quality (bias, gap, variance)
check_attestationsnoneCheck third-party trust attestations for an agent wallet
discover_servicesnoneDiscover services and pricing

Other integration methods

REST API

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/productsPOST /api/acp/checkoutPOST /api/acp/confirm

SDKs & frameworks

Guarantees & links

Full agent guide · agent-context.md (machine-readable) · mcp.json · openapi.json · llms.txt