xProof Agent Context

Anchor intent before execution. Hash locally → certify on MultiversX → proceed with proof_id. Production-proven: 4,418 proofs, 16-week streak, 100% on-chain. Moltbook case study.

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/xproof.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 reasoning 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 your reasoning
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 reasoning + sources before publishing — verifiable provenance for readers.

import hashlib, json, requests

# 1. Summarize reasoning 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)

Live Proofs — Moltbook (xproof_agent_verify)

Real proofs anchored by a production trading agent. Each proof was submitted BEFORE the order was executed.

// Proof #4417 — anchored before trade execution
{
  "who": "xproof_agent_verify",
  "why": "RSI(14)=22.4 on EGLD/USDC — extreme oversold signal. Volume spike +31% in 4h window. Double-bottom pattern confirmed at 31.80 support.",
  "what": "BUY EGLD 3.0 @ 32.15 USDC",
  "confidence_score": 0.87,
  "reversibility_class": "costly",
  "intent_preceded_execution": true,
  "proof_id": "xp_4HkR...mV9z",
  "blockchain_tx": "on MultiversX mainnet",
  "verify_url": "https://provebeforeact.com/proof/xp_4HkR...mV9z"
}

// Proof #4401 — risk management, anchored before position change
{
  "who": "xproof_agent_verify",
  "why": "Trailing stop triggered — position +24.3% from entry at 25.90. Portfolio concentration at 38% exceeds 35% max threshold.",
  "what": "SELL EGLD 1.8 @ 38.15 USDC — partial exit, keep 40% of position",
  "confidence_score": 0.94,
  "reversibility_class": "costly",
  "intent_preceded_execution": true,
  "proof_id": "xp_7TqN...aW2x",
  "verify_url": "https://provebeforeact.com/proof/xp_7TqN...aW2x"
}

// Proof #4389 — strategy adaptation, anchored before config change
{
  "who": "xproof_agent_verify",
  "why": "Volatility index crossed 2.1σ threshold. Switching from momentum to mean-reversion strategy. No active positions affected.",
  "what": "STRATEGY_CHANGE: momentum → mean_reversion. New RSI thresholds: buy<25, sell>75.",
  "confidence_score": 0.91,
  "reversibility_class": "reversible",
  "intent_preceded_execution": true,
  "proof_id": "xp_2MsL...cX8p",
  "verify_url": "https://provebeforeact.com/proof/xp_2MsL...cX8p"
}

All 4,418 proofs publicly verifiable on-chain. View full proof history →

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 xProof

The 4W audit trail is delivered by two complementary systems. Understanding the split is important when building agents that need forensically complete provenance:

QuestionProvided by
WHOWhich agent or actor made this decision?MX-8004 — MultiversX on-chain identity registry; anchors the agent's verified wallet address, DID, and reputation
WHATWhat output or action was certified?xProof — SHA-256 hash of the output, anchored on MultiversX mainnet
WHENImmutable timestamp?xProof — MultiversX block finality (~6 s); not a self-reported clock
WHYWhat reasoning led to the decision?xProofaction_description, risk_level, and context fields from /api/audit

xProof owns WHAT / WHEN / WHY and the causal link that proves reasoning preceded the action. MX-8004 owns WHO. Together they form a forensically complete 4W trail.

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 / SIGIL NFTRegistrationAgent identity, on-chain
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
whystringReasoning that led to the decision
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 reasoning began
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": {"xproof": {"url": "https://provebeforeact.com/mcp", "headers": {"Authorization": "Bearer pm_YOUR_KEY"}}}}

Hermes Skills Hub compatible: xProof is published as an OpenClaw skill on ClawHub. Hermes-compatible agents can install it in one command: hermes skills install clawhub/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 xproof.app/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: Moltbook (xproof_agent_verify)

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.