A design pattern for accountable autonomous agents
What did this agent decide, and when did it decide it?
Autonomous agents act. They read data, form decisions, and execute actions — sometimes with real consequences: financial transactions, code deployments, contract signings, infrastructure changes, data modifications.
When something goes wrong, a single question follows: what did the agent decide, and when did it decide it?
Today, that question is almost always unanswerable.
Logs exist. Every agent running today produces them. But a log is written by the same system that made the decision. An agent that failed silently can reconstruct a clean record. An agent that hallucinated can describe its decision basis in retrospect. There is no technical difference between a real log and a fabricated one.
The log is not a witness. The log is the defendant.
Prove Before Act addresses this gap. Not by making agents smarter or safer — but by requiring them to commit to their intended action and decision basis before acting, in a way that cannot be altered after the fact.
| Term | Definition |
|---|---|
| Agent | Any autonomous software system that observes input, forms a decision, and executes an action without continuous human approval. |
| Intent | The decision an agent commits to before acting: what it will do, why, and under what conditions. |
| Proof | A cryptographic commitment (SHA-256 hash) anchored on an external, immutable ledger at a specific timestamp. The proof cannot be altered after anchoring. |
| Anchor | The act of writing a proof to a ledger. The timestamp is written by the ledger, not by the agent. |
| Evidence | A proof whose timestamp precedes the action it describes. Evidence proves intent existed before execution. |
| Log | A record written by the agent after or during execution. Logs are auditable but not independently verifiable. |
| Accountability | The capacity of a system to produce independently verifiable evidence of its decisions. |
Prove Before Act addresses a specific class of failure. It does not address adversarial attacks, model jailbreaks, or infrastructure compromise. It addresses the accountability gap.
The pattern proves temporal sequence and commitment, not correctness or safety.
The distinction between a log and evidence is temporal and architectural.
| Property | Log | Proof (Prove Before Act) |
|---|---|---|
| Written by | The agent itself | External ledger |
| Timestamp from | Agent's clock | Independent consensus |
| When created | During or after execution | Before execution |
| Alterable | Often yes | No |
| Independently verifiable | No | Yes |
| Proves intent preceded action | No | Yes |
A reconstructed audit trail — however detailed — answers the question "what does the agent say it did?" Prove Before Act answers a different question: "what did the agent commit to before acting, as witnessed by a system it cannot control?"
Prove Before Act is a commit-before-execute sequence. The agent must anchor a cryptographic proof of its intended action before that action executes. The proof timestamp is written by an external ledger.
The second PROVE (outcome) is optional but recommended. Together, they produce a complete chain: intent before action, outcome after — both independently verifiable, linked by a link() call.
For any Prove Before Act implementation, an intent proof MUST be independently timestamped before the action it describes begins.
T(intent_proof) < T(action) If T(intent_proof) ≥ T(action): → the proof is not evidence of pre-action intent → it is a record, not a commitment
A hash anchored after execution proves the content existed — it does not prove the intent preceded the action. The timestamp must be written by the anchoring ledger, not by the agent or its operator. This is why the WHEN in the 4W schema is always null in the agent's payload — the ledger writes it.
Any implementation of Prove Before Act requires exactly four operations. These are pattern-level — not specific to any anchoring ledger or implementation.
Prove Before Act is ledger-agnostic. An implementation may use a public blockchain, transparency log, timestamping authority, or any independently verifiable anchoring system — provided the requirements of this specification are satisfied.
Compute a SHA-256 hash of the content locally. Write the hash to an external ledger. Return a proof_id with an immutable timestamp. Raw content never leaves the agent's environment.
Given a proof_id, return the anchored hash, the ledger timestamp, and confirmation status. Anyone can call verify — no account required.
Given two proof_ids, determine whether the first proof was anchored before the second. This is the core evidence operation: it answers whether intent preceded action.
Explicitly associates an intent proof with its outcome proof, establishing the full WHY→WHAT chain. Required for audit graphs, delegation trees, and agent trust registries. Without this primitive, intent and outcome remain disconnected records rather than a verifiable chain.
// Minimal implementation contract
interface ProveBeforeAct {
anchor(content: string | Buffer, metadata?: object): Promise<{
proof_id: string;
hash: string;
timestamp: number; // written by ledger
verify_url: string;
}>;
verify(proof_id: string): Promise<{
hash: string;
timestamp: number;
status: 'confirmed' | 'pending' | 'not_found';
}>;
compare(intent_proof_id: string, action_proof_id: string): Promise<{
intent_preceded_action: boolean;
delta_ms: number;
}>;
link(intent_proof_id: string, outcome_proof_id: string): Promise<{
chain_id: string;
intent_preceded_action: boolean;
}>;
}
For an intent proof to be useful, it must answer four questions independently.
| W | Question | What to anchor |
|---|---|---|
| WHO | Which agent made this decision? | Agent identifier, version, model hash |
| WHY | What was the decision basis? | Decision rationale, trigger, context hash |
| WHAT | What action was decided? | Action description, parameters, target |
| WHEN | When was the decision made? | Ledger timestamp (external, not agent clock) |
{
"who": "agent-id-v2.3.1",
"why": "RSI below 30 threshold, risk/reward 1:3, within position limits",
// decision basis, not internal chain-of-thought
"what": "BUY BTC 0.5 at market",
"when": null // set by ledger, not by agent
}
The WHEN field is intentionally null. Writing a timestamp here would allow post-hoc fabrication. The ledger timestamp is the only authoritative WHEN.
When Agent A delegates to Agent B, the Prove Before Act pattern extends to the delegation itself. Each boundary in a multi-agent system requires its own proof.
The delegation proof establishes that Agent A authorized Agent B before B acted. The execution proof establishes what B did. Together — linked via link() — they produce a verifiable chain of custody across agents.
In deeper hierarchies (Human → A → B → C), each delegation boundary requires its own proof. Accountability does not dissolve across boundaries; it is enforced at each one. This is the foundation of machine-to-machine accountability.
signal = observe_market()
decision = agent.decide(signal)
# Prove Before Act
intent_proof = anchor({
who: agent.id,
why: decision.rationale, # decision basis, not internal chain-of-thought
what: f"BUY {decision.asset} {decision.amount}",
when: null # ledger writes this
})
if intent_proof.status == "confirmed":
result = execute_trade(decision, proof_id=intent_proof.id)
outcome_proof = anchor({ what: result.summary, when: null })
link(intent_proof.id, outcome_proof.id)
pr = observe_pull_request()
analysis = agent.analyze(pr)
intent_proof = anchor({
who: "deploy-agent-v1",
why: analysis.rationale,
what: f"DEPLOY to production: {pr.id}",
when: null
})
if intent_proof.status == "confirmed":
deploy(pr, proof_id=intent_proof.id)
// xProof maps anchor() → certify_file MCP tool
{
"name": "certify_file",
"arguments": {
"file_hash": "sha256_of_intent_json",
"filename": "intent.json",
"metadata": {
"who": "my-agent-v2",
"what": "execute trade BUY BTC 0.5",
"why": "RSI=38, below oversold threshold",
"purpose": "prove_before_act"
}
}
}
// Returns { proof_id, verify_url, status: "anchored" }
// → Execute only after status confirmed
// → Use coherence/link to bind intent_proof to outcome_proof
Any implementation claiming Prove Before Act compliance must satisfy the following.
xProof is the reference implementation of Prove Before Act. It satisfies all requirements in section 10 using MultiversX as the anchoring ledger and supports x402 for fully autonomous operation.
| Property | xProof |
|---|---|
| Anchoring ledger | MultiversX mainnet |
| Hash algorithm | SHA-256 |
| Payment | x402 / USDC on Base ($0.01/proof) |
| Free trial | 10 proofs, no wallet or account required |
| MCP integration | Native MCP server at provebeforeact.com/mcp |
| Python SDK | pip install xproof |
| Node SDK | npm install @xproof/xproof |
| OpenClaw / Hermes | openclaw skills install xproof |
Prove Before Act is an open pattern. It is ledger-agnostic. Any implementation that satisfies the requirements in section 10 is a valid Prove Before Act implementation, regardless of anchoring ledger, payment mechanism, or tooling.
If you have implemented the pattern on a different ledger, built a third-party integration, or identified a gap in this specification — contributions are welcome.
The goal is not for xProof to be the only implementation. The goal is for Prove Before Act to become the vocabulary developers reach for when they need to answer: what did this agent decide, and when did it decide it?
The day someone writes in their README "This agent implements the Prove Before Act pattern" without using xProof, the category will have arrived.
Contact: provebeforeact.com · @JasonxProof