ERC-8354 · Draft · ERC · 2026-07-16
ERC-8354: Confidential Agent Policy Verdicts
Defines a zero-knowledge "verdict" an AI agent must present before acting: proof that a committed but secret policy was evaluated over this exact action and allowed it, consumable once by one executor before an expiry.
What problem does it solve?
Operators who run AI agents in regulated settings often enforce screening rules, much like a card network's fraud rules: they apply to every transaction, change often, and are kept secret, because published rules are easy to evade. Existing options fall short:
- Put the rules on-chain, and the very adversaries they target can read them.
- Trust an off-chain service that just says "allowed", and there is no evidence any policy was applied.
- ERC-8004 reputation and validation records come after an action, too late to stop it.
ERC-8354 uses zero knowledge to get both properties. A guard contract learns that a committed policy was correctly evaluated for this specific action and returned ALLOW, without learning anything about the rules. Only the policy is hidden; the action itself is public once executed.
How it works
- Policy commitment. A policy domain hashes its ruleset and registers it as a statement in the ERC-7812 evidence registry. The resulting registry root is the
policyRoot. Each new version goes under a new key; old ones are never overwritten, so past decisions stay auditable. - Fixed interpreter. The proof is of a generic policy interpreter that takes the ruleset as a private input. Rules can change weekly without deploying new verifiers; only the root moves.
- Verdict envelope (all fields are public proof inputs):
agentId,domainId,policyRoot,actionCommitment,executor,expiry,nullifier,decision(0/1) andpolicyKind(ALLOWED, DENIED, NOT_PERMITTED, COULD_NOT_EVALUATE). - Action commitment =
keccak256(abi.encode(chainid, domainId, agentId, target, value, keccak256(callData), actionNonce)). The guard recomputes it itself and never accepts a caller-supplied value. consume(v, proof[, executorAuth])runs nine ordered checks: kind matches decision, agent exists (if the domain names an ERC-8004 registry), domain active, decision is ALLOW, caller is the executor (or has an EIP-712 / ERC-1271 signature from it), not expired, nullifier unused, root acceptable, proof valid. It then burns the nullifier.- Guards should then write an attestation to the ERC-8004 Validation Registry, tagged
mechanism = keccak256("zk-secret-policy"), which records compliance without revealing the policy.
Sample code
A guarded executor, adapted from the reference implementation:
contract GuardedExecutor is IPolicyGuarded {
IConfidentialPolicyVerdict public immutable guard;
bytes32 public immutable domainId;
mapping(uint256 => uint256) public actionNonce;
function execute(
Verdict calldata v, bytes calldata proof, bytes calldata executorAuth,
address target, uint256 value, bytes calldata callData
) external returns (bytes memory) {
bytes32 expected = keccak256(abi.encode(
block.chainid, domainId, v.agentId,
target, value, keccak256(callData), actionNonce[v.agentId]
));
require(expected == v.actionCommitment, "wrong action");
actionNonce[v.agentId] += 1;
guard.consume(v, proof, executorAuth); // reverts unless a valid ALLOW verdict
(bool ok, bytes memory ret) = target.call{value: value}(callData);
require(ok, "call failed");
return ret;
}
}
Things to know
- Status: Draft. The interface and its ERC-165 ID may change.
- A valid verdict proves the committed interpreter ran and said ALLOW. It says nothing about whether the policy is fair, correct or non-malicious. Trust in the domain operator is still required.
- Executor binding is mandatory; without it, anyone who saw a verdict could front-run its use.
- A superseded root stays acceptable for
maxRootAge, so rule tightening takes effect with that delay. Revoking a domain is immediate. - The standard does not fix a policy language or proving system. The spec mentions zkVMs and Noir as options.
- Related agent standard: ERC-8273 gates actions with transaction-scoped attestations from a trusted attestor rather than ZK proofs.