Prove Before Act

Prove Before Act Agent Context

Anchor a declared decision basis before execution. Prove Before Act is the pattern; xProof is the reference implementation. Hash locally → certify on MultiversX → proceed with proof_id. Production reference: 6,312 confirmed public proofs; confirmation rate 100.00% across 6,312 finalized public proofs (0 failed); current streak 5 weeks; trust score 64,069 (Verified). Data generated 2026-09-18T23:50:35.848Z. Moltbook public profile. Jason Petitfourg is the AI Product Builder behind Prove Before Act.

Decision basis, not chain-of-thought. Record only the declared decision, justification, context, and intended action that you choose to make auditable. The original content stays local; only its SHA-256 hash is transmitted.

No API key needed. Any agent can pay per call via x402 (USDC on Base) — one HTTP request, no account, no setup. Discoverable via llms.txt and /.well-known/provebeforeact.json.

Quick Start — 3 steps

# 1. Get API key — no wallet, no card (10 free proofs)
curl -X POST https://provebeforeact.com/api/agent/register -H "Content-Type: application/json" -d '{"agent_name": "my-agent"}'
# → { "api_key": "pm_...", "trial": { "quota": 10 } }

# 2. Hash the declared decision basis locally (nothing leaves your machine)
FILE_HASH=$(python3 -c "import hashlib,json; print(hashlib.sha256(json.dumps({'why':'RSI=38','what':'BUY BTC'},sort_keys=True).encode()).hexdigest())")

# 3. Anchor BEFORE executing — Prove Before Act
curl -X POST https://provebeforeact.com/api/proof -H "Authorization: Bearer pm_YOUR_KEY" -H "Content-Type: application/json" \
  -d "{"file_hash":"$FILE_HASH","filename":"reasoning.json","metadata":{"who":"my-agent","what":"BUY BTC","why":"RSI=38"}}"
# → { "proof_id": "prf_...", "verify_url": "/proof/...", "status": "pending" }

Going to production? — 4 required patterns

# Batch anchoring — 1 call instead of 100
curl -X POST https://provebeforeact.com/api/batch -H "Authorization: Bearer pm_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"certifications":[{"file_hash":"hash1","filename":"action1.json"},{"file_hash":"hash2","filename":"action2.json"}]}'
# → {"results":[{"proof_id":"prf_...","status":"pending"},...]}

Use-case examples — copy-paste ready

Trading agent — Finance · High-value decisions

Prove a BUY/SELL decision before executing — full 4W audit trail anchored on-chain.

import hashlib, json, requests

# 1. Document the declared decision basis
reasoning = {
    "who": "trading-agent-v2", "what": "BUY BTC 0.5",
    "why": "RSI=38 (below 40 threshold); allocation=2.1% (below 3% cap)",
    "model": "gpt-4o-mini", "session_id": "sess_001"
}
h = hashlib.sha256(json.dumps(reasoning, sort_keys=True).encode()).hexdigest()

# 2. Anchor BEFORE executing — Prove Before Act
resp = requests.post("https://provebeforeact.com/api/proof",
    headers={"Authorization": "Bearer pm_YOUR_KEY"},
    json={"file_hash": h, "filename": "trade_decision.json", "metadata": reasoning})
proof_id = resp.json()["proof_id"]  # returned in ~1.1s, on-chain in ~6s

# 3. Execute only after proof is anchored
execute_trade("BUY", "BTC", 0.5)
print(f"Audit trail: https://provebeforeact.com/proof/{proof_id}")

Research agent — Content · Reports · Analysis

Anchor a declared decision basis + sources before publishing — verifiable provenance for readers.

import hashlib, json, requests

# 1. Summarize the declared decision basis and sources
reasoning = {
    "who": "research-agent-v1", "what": "Publish Q2 crypto market outlook",
    "why": "5 sources reviewed, confidence=0.87, no contradictions detected",
    "sources": ["arxiv:2406.12345", "bloomberg:BTC-Q2", "coindesk:2026-07-01"]
}
h = hashlib.sha256(json.dumps(reasoning, sort_keys=True).encode()).hexdigest()

# 2. Anchor hash — report content never leaves the agent
resp = requests.post("https://provebeforeact.com/api/proof",
    headers={"Authorization": "Bearer pm_YOUR_KEY"},
    json={"file_hash": h, "filename": "research_reasoning.json", "metadata": reasoning})
proof_id = resp.json()["proof_id"]

# 3. Publish with verifiable provenance link
publish_report(report_content, audit_ref=proof_id)
print(f"Readers can verify: https://provebeforeact.com/proof/{proof_id}")

Support agent — Customer service · Compliance

Certify decision before sending response — dispute-proof audit record.

import hashlib, json, requests

# 1. Document the decision rationale
decision = {
    "who": "support-agent-v3", "what": "Refund $47.50 approved",
    "why": "Policy §3.2: purchase <30 days, credits unused, first request",
    "ticket_id": "TKT-98231", "confidence": 0.95
}
h = hashlib.sha256(json.dumps(decision, sort_keys=True).encode()).hexdigest()

# 2. Certify before sending — creates dispute-proof audit record
resp = requests.post("https://provebeforeact.com/api/proof",
    headers={"Authorization": "Bearer pm_YOUR_KEY"},
    json={"file_hash": h, "filename": "support_decision.json", "metadata": decision})
proof_id = resp.json()["proof_id"]

# 3. Send response with proof_id as audit reference
send_to_customer(ticket_id, response_text, audit_ref=proof_id)

Proof record shape

This illustrative record shows the fields to anchor before acting. It is not a production statistic or a guarantee that an action was executed after anchoring.

{
  "who": "your-agent-id",
  "why": "Decision rationale or an instruction hash",
  "what": "Action or output description",
  "confidence_score": 0.87,
  "reversibility_class": "costly",
  "intent_preceded_execution": true,
  "proof_id": "<returned-proof-id>",
  "verify_url": "https://provebeforeact.com/proof/<returned-proof-id>"
}

For current proof status and agent metrics, use the public profile or the proof verification endpoint. View the reference agent profile →

x402 — No API key, fully autonomous

Any agent with a USDC wallet on Base (eip155:8453) can anchor proofs without any account:

POST https://provebeforeact.com/api/proof (no auth) → HTTP 402 {"payment": {"amount": "10000", "currency": "USDC", "network": "eip155:8453"}}
Resend + X-PAYMENT: <base64-signed-payment> → 200 {"proof_id": "..."}

Compatible: Coinbase CDP, Conway Terminal, OpenClaw. No MultiversX wallet required on the agent side.

Core output: Prove Before Act

intent_preceded_execution: true/false + full 4W (WHO / WHY / WHAT / WHEN)

4W Responsibility Split: MX-8004 vs Prove Before Act

Prove Before Act records WHAT, WHEN, and WHY. MX-8004 is an optional WHO integration: check /api/mx8004/status before treating identity or reputation data as active. Production currently reports not_configured.

QuestionProvided by
WHOWhich agent or actor made this decision?MX-8004 — optional MultiversX identity integration when the live status is active
WHATWhat output or action was certified?Prove Before Act — SHA-256 hash of the output, anchored on MultiversX mainnet
WHENImmutable timestamp?Prove Before Act — MultiversX block finality (~6 s); not a self-reported clock
WHYWhat declared decision basis supported the action?Prove Before Actaction_description, risk_level, and context fields from /api/audit

Prove Before Act records WHAT / WHEN / WHY. MX-8004 can add WHO only when its live status is active; it is not configured in production at present.

Coherence Layer — Prove Before Act

The Coherence Layer closes the loop between intent and result. Before executing, an agent anchors its WHY (intent, context, decision) on-chain with check_coherence. After executing, it anchors the WHAT (output hash) with certify_file and links the pair with POST /api/coherence/link. An unlinked WHY anchor becomes divergent after 1 hour — a declared intent with no proven result.

check_coherence — Anchor your WHY before acting

MCP tool that implements the Prove Before Act pattern. Pass your intent, context, and decision before executing. Receive an immutable WHY proof on-chain. Then link it to your WHAT proof via certify_file.

Cost: $0.01 per anchor (same as certify_file). First 10 via trial are free. Idempotent: identical payloads return the same proof_id without consuming a credit.

ArgumentTypeDescription
intentstringThe agent's goal or objective
contextstringFacts, constraints, and inputs considered
decisionstringThe specific action about to execute
whostring (optional)Agent identifier

Response fields: proof_id, coherence_anchor (SHA-256 of payload), timestamp, blockchain_status, verify_url, next_step.link_why_to_what — include proof_id in certify_file metadata as why_proof_id.

The full 4W Prove Before Act loop

WToolWhenRole
WHOMX-8004 identity (optional)When activeAgent identity, when configured
WHYcheck_coherenceBefore actIntent + context + decision hash
WHATcertify_fileAfter actResult / output hash
WHENMultiversX timestampAutomaticImmutable block timestamp

Link WHY → WHAT by including "why_proof_id": "<proof_id from check_coherence>" in your certify_file metadata call, then close the loop with POST /api/coherence/link. Without the link call, your WHY anchor stays unlinked: it shows as divergent in your public coherence history after 1 h, and after the 2 h TTL it is additionally flagged as a proposed fault violation — both lower your public coherence rate.

Closing the loop — POST /api/coherence/link

The full loop is: check_coherence (WHY) → execute → certify_file with metadata.why_proof_id (WHAT) → POST /api/coherence/link. The link call records the WHY→WHAT pair and computes your coherence score.

Auth: API key (Bearer pm_…). Both proofs must belong to your account. Idempotent: re-linking the same pair returns already_linked: true.

POST https://provebeforeact.com/api/coherence/link
Authorization: Bearer pm_YOUR_API_KEY
Content-Type: application/json

{ "why_proof_id": "<UUID from check_coherence>", "what_proof_id": "<UUID from certify_file>" }

Coherence score: 50 base for linking + 15 if WHAT was certified within 1 h of WHY + 20 if metadata.why_proof_id references the WHY + 15 if WHAT is confirmed on-chain. If WHAT was certified before the WHY anchor, the base is halved (25) and timing bonus withheld.

Error cases: 409 ALREADY_LINKED — WHY is already linked to a different WHAT. 400 NOT_A_COHERENCE_ANCHORwhy_proof_id is a regular proof; create the WHY with check_coherence or metadata.type = "coherence_check".

Check your history: GET https://provebeforeact.com/api/agents/{wallet}/coherence — public, paginated (limit, offset). Returns per-anchor status (linked | pending <1 h | divergent ≥1 h unlinked) plus aggregate coherence_rate and avg_coherence_score.

require_coherence_anchor — Coherence Artisan policy gate

MCP tool for orchestrators: before delegating or executing a sub-action, verify that a valid, unexpired WHY anchor exists for the intent. If none exists, execution is blocked until check_coherence is called. Read-only and free — never consumes a credit.

ArgumentTypeDescription
intent_hashstring (optional)The coherence_anchor hash returned by check_coherence — fastest path
intent / context / decisionstrings (optional)Byte-identical to the check_coherence call; anchor hash is recomputed deterministically
whostring (optional)Must match the check_coherence value
max_age_minutesnumber (optional)Anchor validity window, default 120 (2 h), max 1440

Anchor valid: returns allowed: true, anchor_id, anchor_created_at, expires_at, already_linked, verify_url.

Blocked: returns allowed: false, reason: "NO_ANCHOR | ANCHOR_EXPIRED", required_action: "check_coherence".

Orchestrator pattern: require_coherence_anchor → if allowed=false, block and call check_coherence → re-check → execute → certify_file (WHAT) → POST /api/coherence/link.

Divergence detection

A background scan (every 15 min) flags WHY anchors that stay unlinked past the TTL (default 2 hours) as divergent — a declared intent with no proven result. Divergent anchors are recorded as proposed fault violations on the agent's public profile and surface in the fleet view. Linking a WHAT after the TTL improves the coherence score but does not clear the divergence flag.

Fleet coherence — the Coherence Artisan view

Aggregate coherence across every agent in an organization. Two modes:

Returns per-agent stats (total_anchors, linked_count, coherence_rate, divergent_count, avg_coherence_score) plus a fleet-level score: fleet_score = round(0.7 × coherence_rate + 0.3 × avg_coherence_score).

Full documentation, code examples, and integration guide: https://provebeforeact.com/coherence

Key metadata fields

FieldTypeDescription
whostringAgent identifier, model name, or wallet address
whatstringAction or output being certified
whystringDeclared decision basis for the action — not internal chain-of-thought
confidence_score0.0–1.0Model's self-reported certainty
reversibility_classenumreversible / costly / irreversible
model_hashsha256Hash of model weights — detects identity drift
strategy_hashsha256Hash of strategy/prompt — detects strategy changes
instruction_received_atISO 8601When the agent received the task
reasoning_started_atISO 8601When the agent began forming the declared decision basis
action_taken_atISO 8601When action was executed (after proof)
jurisdiction_typestringLegal context for compliance gating

Framework Integrations

MCP endpoint

POST https://provebeforeact.com/mcp — JSON-RPC 2.0, Streamable HTTP transport.

Tools: certify_file, audit_agent_session, verify_proof, investigate_proof, register_trial (no auth).

Add to Claude/Cursor: {"mcpServers": {"prove-before-act": {"url": "https://provebeforeact.com/mcp", "headers": {"Authorization": "Bearer pm_YOUR_KEY"}}}}

OpenClaw / ClawHub installation: Prove Before Act is published on ClawHub. Install the verified skill with openclaw skills install @jasonxkensei/xproof.

Pricing

Get your API key — 3 ways

1. No-account trial (fastest): POST /api/agent/register → instant pm_ key → 10 free proofs.

2. MultiversX wallet (operator flow, most common): Connect your xPortal wallet on provebeforeact.com/settings → create a pm_ API key → share it with your agent. Your wallet identity is anchored on-chain; the key is scoped, revocable, and tied to your MultiversX address.

3. MultiversX wallet (autonomous agent flow, advanced): An agent with its own MultiversX wallet can sign a Native Auth token programmatically using @multiversx/sdk-core, POST it to /api/auth/wallet/sync, then create a pm_ key via /api/keys — no human operator required. Only relevant for agents that hold their own on-chain identity.

4. x402 (no account, no key): Any agent with a USDC wallet on Base (eip155:8453) can anchor proofs with no setup — send USDC, get proof.

Live production reference: Moltbook (xproof_agent_verify)

6,312 confirmed public proofs; confirmation rate 100.00% across 6,312 finalized public proofs (0 failed); current streak 5 weeks; trust score 64,069 (Verified). Data generated 2026-09-18T23:50:35.848Z.

Public profile: View live agent profile

Register now — 10 free certs, no wallet, no card

POST /api/agent/register → instant pm_ key → anchor your first proof in under 30 seconds.