ERC-8354 Agent Confidential Policy Allowance Proof (Confidential Agent Policy Verdicts)

Draft · Signatures & auth · created 2026-07-16

Defines a verdict and verification interface that, before an agent action is executed, shows via zero-knowledge proof only the fact that the policy evaluating that action allowed it, without ever disclosing the policy's content.

Why it is needed

Until now, standards governing agent actions have followed two paths. One is a post-hoc approach that records identity and reputation after the action. The other is a pre-signed approach that checks whether the actual action matches a specific delegation the user signed in advance. In both, the starting point of authority is the user's signature. But as with credit card fraud detection rules, in practice the cardholder often does not pre-sign every charge, and the rules are not disclosed, because disclosing the rules would reveal how to evade them. In this situation the remaining options were either putting the policy on-chain (which gets evaded) or simply trusting an off-chain oracle's judgment (which leaves no evidence the policy was actually applied), and both fail. This standard resolves this tension using zero-knowledge proofs.

What to implement

In depth

The Verdict envelope and the four policyKind states

The Verdict struct has nine fields: agentId, domainId, policyRoot, actionCommitment, executor, expiry, nullifier, decision, and policyKind, all of which must be public inputs to the proving program. Decision is only a single bit, 0 (DENY) or 1 (ALLOW), which collapses every kind of denial into one, so policyKind breaks it down further into four states: ALLOWED (0), DENIED (1), NOT_PERMITTED (2), and COULD_NOT_EVALUATE (3). If decision is 1, policyKind must be 0; if decision is 0, policyKind must be one of 1, 2, or 3; if the two are inconsistent, the verdict is rejected before any other check.

actionCommitment and replay prevention

actionCommitment is a value binding block.chainid, domainId, agentId, target, value, keccak256(callData), and actionNonce together via abi.encode and keccak256. The guard must recompute this value directly from the action it is about to execute and compare it against Verdict.actionCommitment; it must not simply accept a value passed in by the caller. chainId prevents replay on a different chain, domainId prevents replay in a different policy domain, and actionNonce prevents repeated replay of the same action.

Separation of roles between the two hash functions

actionCommitment and the hashing of on-chain events and structs use only keccak256, which the EVM uses natively. By contrast, the keys/values of ERC-7812 statements, the policy inclusion proof, and the nullifier use the field-friendly hash H of the target EvidenceDB, which is Poseidon in the deployed singleton registry. Since a keccak256 digest is 256 bits, it does not fit directly into H's finite field, so it must be split into field-sized chunks (e.g. the upper and lower 128 bits) before being fed in.

The 9-step ordered checks in consume

consume must check in exactly this order and revert on the first failure: 1) decision and policyKind consistency, 2) if the domain has designated an identity registry, whether agentId exists in it, 3) domain active status, 4) decision==1, 5) executor authorization (direct msg.sender match or EIP-712 signature), 6) expiry time, 7) nullifier reuse, 8) policyRoot validity, 9) proof verification. Step 1 comes first because any later check could otherwise mask a mismatch in step 1.

A fixed interpreter design that avoids rewriting the circuit for every policy

Compiling a policy directly into a circuit means the verification key changes every time the rules change, requiring a new verifier to be redeployed on every chain. This is operationally impossible for a ruleset that changes weekly. Instead, by proving a fixed interpreter and passing the ruleset in as a private witness, programKey stays the same even as the policy changes, and only the ERC-7812 root moves. Because the interpreter must prove a broader scope than any single policy, the proving cost increases, which is an intended tradeoff.

Policy registration and audit trail via ERC-7812

A policy domain must register the ruleset hash (policyCommitment) via the ERC-7812 Registrar under the key H(domainId, version), and must not overwrite past versions. Unlike ERC-7812's usual blinding pattern, this commitment value is an unblinded plaintext hash, because blinding it would make it impossible even for the party holding the ruleset to verify, breaking the audit trail. Low-entropy rulesets must have a high-entropy salt appended before hashing.

Composition with ERC-8004, conditional identity checks

A domain can optionally designate an ERC-8004 identity registry via Domain.identityRegistry. If designated, agentId must exist in that registry via ownerOf, or it is rejected with AgentUnknown. If it is address(0), this check is not performed at all. After a successful consume, the guard can record a VerdictAttestation in the ERC-8004 Validation Registry, which includes artifactHash (= actionCommitment), policyRoot, and mechanism (keccak256("zk-secret-policy")), among others, and never includes the ruleset content.

A proposal still in Draft stage

This ERC is currently in Draft status, and the ERC-7812 and ERC-8004 it depends on are also not yet Final at the time of writing. The specification itself can hold even while in Draft or Review status, but for this standard to advance to Final, both of those dependent standards must become Final first. Implementers are advised to pin the exact versions of the two dependent standards.

Things to watch out for

Original ERC · ← ERCs