--- name: Prove Before Act description: The accountability pattern for autonomous agents. xProof is the reference implementation: commit a declared decision basis before acting, never internal chain-of-thought. version: 1.0.0 author: provebeforeact.com license: public --- # Prove Before Act Agent Skill ## What This Does Prove Before Act is the accountability pattern for autonomous agents; xProof is the reference implementation. Before a significant action, commit a declared decision basis — intended action, context, and justification — then anchor the verified outcome after execution. Do not submit internal chain-of-thought. Proofs use SHA-256 hashes on MultiversX, so the original source material remains local while any agent, human, or third party can independently verify the evidence. ## Authentication — Free Trial (Start Here) No wallet. No browser. No payment. ### Option A — MCP (fastest, if you are already in an MCP session) Call the `register_trial` MCP tool directly — no Authorization header needed: ```json { "name": "register_trial", "arguments": { "agent_name": "your-agent-name" } } ``` Returns: `api_key`, `trial_remaining: 10`, `next_step` with usage instructions. ### Option B — REST (one HTTP call) ```bash curl -X POST https://provebeforeact.com/api/agent/register \ -H "Content-Type: application/json" \ -d '{"agent_name": "your-agent-name"}' ``` Returns: { "api_key": "pm_xxx", "trial": { "quota": 10, "remaining": 10 } } Step 2 — Use the key immediately. No further setup needed. ## Certify a File ```bash curl -X POST https://provebeforeact.com/api/proof \ -H "Authorization: Bearer pm_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_hash": "64-char-sha256-hex", "filename": "document.pdf" }' ``` Returns: ```json { "proof_id": "...", "status": "certified", "verify_url": "https://provebeforeact.com/proof/{proof_id}", "blockchain": { "network": "MultiversX", "transaction_hash": "...", "explorer_url": "https://explorer.multiversx.com/transactions/..." }, "trial": { "remaining": 9 } } ``` Response header: X-Trial-Remaining: 9 ## Certify Multiple Files (Batch) ```bash curl -X POST https://provebeforeact.com/api/batch \ -H "Authorization: Bearer pm_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "files": [ {"file_hash": "...", "filename": "file1.pdf"}, {"file_hash": "...", "filename": "file2.md"} ] }' ``` Up to 50 files per call. ## Check Your Quota ```bash curl https://provebeforeact.com/api/me \ -H "Authorization: Bearer pm_YOUR_API_KEY" ``` Returns: trial_quota, trial_used, trial_remaining, total certifications. ## List Your Certifications ```bash curl https://provebeforeact.com/api/certifications \ -H "Authorization: Bearer pm_YOUR_API_KEY" ``` ## Verify a Proof ```bash curl https://provebeforeact.com/proof/{proof_id}.json ``` No auth required. Public endpoint. ## Compute a SHA-256 Hash ```bash sha256sum myfile.pdf # or echo -n "content" | sha256sum ``` ## Pricing $0.01 per certification. After trial: pay via USDC on Base (x402, no account needed) or EGLD on MultiversX (ACP). x402 — pay per use, no account: ```bash # 1. Send without auth → get 402 with payment requirements curl -X POST https://provebeforeact.com/api/proof -d '{"file_hash":"...","filename":"..."}' # 2. Pay USDC on Base, resend with X-PAYMENT header ``` ## Agent Audit Log Standard — Operator Policy Templates for AI Agents Operators can choose to require a certified proof before critical actions. Schema: https://provebeforeact.com/.well-known/agent-audit-schema.json **Example 1 — Trade execution (DeFi agent)** Certify a decision BEFORE executing it: ```bash curl -X POST https://provebeforeact.com/api/audit \ -H "Authorization: Bearer pm_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "my-trading-agent", "session_id": "sess_20260227_001", "action_type": "trade_execution", "action_description": "Buy 0.5 ETH at market price on Uniswap v3", "inputs_hash": "a3f1c7d2e9b4...64-char-sha256-of-analyzed-inputs", "inputs_manifest": { "fields": ["btc_usd_price", "eth_usd_price", "portfolio_nav", "volatility_30d", "slippage_estimate"], "sources": ["binance_ws", "internal_risk_engine"], "hash_method": "SHA-256 over JSON.stringify(inputs, Object.keys(inputs).sort())" }, "risk_level": "high", "decision": "approved", "timestamp": "2026-02-27T23:00:00Z", "risk_summary": "Slippage < 0.5%, liquidity verified on 3 pools" }' ``` **Example 2 — Smart contract deployment (MultiversX / Base)** An operator policy for a mainnet deployment can require an anchored decision proof before sending the transaction. A returned proof_id is an irrevocable on-chain record that the deployment was intentional and reviewed. ```bash curl -X POST https://provebeforeact.com/api/audit \ -H "Authorization: Bearer pm_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "deploy-agent-v3", "session_id": "sess_deploy_20260811_001", "action_type": "code_deploy", "action_description": "Deploy TokenSwap v3 contract to MultiversX mainnet — replaces v2 at erd1qqqq...abc", "inputs_hash": "b7e2f1a3c9d4...64-char-sha256-of-all-inputs-below", "inputs_manifest": { "fields": [ "bytecode_hash", "constructor_args", "gas_limit", "target_network", "replaces_contract", "audit_report_hash", "simulation_tx_hash" ], "sources": ["mvx_mainnet_gateway", "internal_audit_pipeline", "simulation_vm"], "hash_method": "SHA-256 over JSON.stringify(inputs, Object.keys(inputs).sort())" }, "risk_level": "critical", "decision": "approved", "timestamp": "2026-08-11T14:00:00Z", "risk_summary": "Bytecode matches audited commit a3f1c7d. Simulation passed on devnet (10/10 scenarios). Gas estimate within 5% of v2 baseline. No constructor arg mutation detected.", "context": { "network": "MultiversX mainnet", "bytecode_hash": "a3f1c7d2e9b4...same-hash-as-verified-by-audit", "replaces": "erd1qqqq...abc (v2 — deprecated after deploy)", "audit_by": "CertiK report #CK-2026-0811" } }' ``` **Why this matters for code-deploying agents**: if your agent is compromised and deploys malicious code, the absence of a proof_id for that deployment is forensic evidence of the attack. If a legitimate deployment goes wrong, the proof_id proves the agent acted in good faith with the inputs it had. Either way, the on-chain anchor is the difference between accountability and ambiguity. Returns: { "proof_id": "...", "audit_url": "https://provebeforeact.com/audit/{id}", "decision": "approved", "risk_level": "critical" } Use the returned proof_id as compliance certificate. **Do not send the deploy transaction until you have a proof_id.** View at /audit/{proof_id}. Operator-policy workflow templates (operators choose how to handle a missing proof_id): - LangChain: https://provebeforeact.com/agent-tools/audit-guard-langchain.py - CrewAI: https://provebeforeact.com/agent-tools/audit-guard-crewai.py - n8n: https://provebeforeact.com/agent-tools/audit-guard-n8n.json - Eliza OS: https://provebeforeact.com/agent-tools/audit-guard-eliza.ts MCP tool: audit_agent_session (same params, enforces auth) ## More - Compact discovery: https://provebeforeact.com/.well-known/provebeforeact.json - Full docs: https://provebeforeact.com/llms.txt - Specification: https://provebeforeact.com/.well-known/provebeforeact.md - OpenAPI: https://provebeforeact.com/api/acp/openapi.json - MCP endpoint: https://provebeforeact.com/mcp - Audit Log Schema: https://provebeforeact.com/.well-known/agent-audit-schema.json