ERC-8196 · Final · ERC · 2026-03-14
ERC-8196: AI Agent Authenticated Wallet
A smart-wallet interface that lets an AI agent act for a user only within an owner-defined, signed policy, with spending limits, contract allowlists, expiry and a hash-chained audit trail.
What problem does it solve?
Letting an autonomous AI agent move funds is risky. If the agent holds a private key, whoever hosts the agent can steal it. If you simply delegate access, there is no enforceable limit on what the agent does and no reliable record of what it did. A malicious host can also nudge a probabilistic model by re-sampling until it gets an answer it likes, or replay old approvals.
ERC-8196 defines the "execute" layer of a two-part trust stack:
| Layer | Standard | Question |
|---|---|---|
| 1. Identify and verify | ERC-8126 | Is this agent trustworthy? |
| 2. Execute | ERC-8196 | Is this action authorized right now? |
How it works
The owner registers a policy on a smart wallet (typically an ERC-4337 account or a policy module). A policy names the agent and its ERC-8126 agentId, and sets:
allowedActions(e.g."transfer","swap"),allowedContractsandblockedContracts;maxValuePerTxand an optionalmaxValuePerDay(wei);validAfter/validUntil;minVerificationScore: the worst ERC-8126 risk score still accepted (lower score means lower risk, so actions are rejected when the agent's score is above this value).
To act, the agent signs an EIP-712 AgentAction that includes the policyHash, a nonce, an expiry and an entropyCommitment. The commitment is part of a commit-reveal scheme meant to make it harder for a host to steer the agent by repeated sampling. executeAction checks the signature, the policy limits and the agent's current ERC-8126 score, then performs the call and logs an audit entry.
Each audit entry MUST carry the hash of the previous one, so any tampering breaks the chain. Entries may be stored off-chain (e.g. IPFS) with Merkle roots anchored on-chain. The owner can revokePolicy at any time.
Sample code
Signing an agent action with ethers v6:
import { Wallet, ZeroHash } from "ethers";
const agent = new Wallet(process.env.AGENT_KEY!);
const domain = { name: "AgentWallet", version: "1", chainId: 1, verifyingContract: walletAddress };
const types = {
AgentAction: [
{ name: "agent", type: "address" },
{ name: "action", type: "string" },
{ name: "target", type: "address" },
{ name: "value", type: "uint256" },
{ name: "data", type: "bytes" },
{ name: "nonce", type: "uint256" },
{ name: "validUntil", type: "uint256" },
{ name: "policyHash", type: "bytes32" },
{ name: "entropyCommitment", type: "bytes32" },
],
};
const action = {
agent: agent.address, action: "transfer", target: tokenAddress,
value: 0n, data: calldata, nonce: 7n,
validUntil: BigInt(Math.floor(Date.now() / 1000) + 300),
policyHash, entropyCommitment: ZeroHash,
};
const signature = await agent.signTypedData(domain, types, action);
// then: wallet.executeAction(policyHash, target, value, data, nonce, entropyCommitment, signature)
The domain values above are placeholders; use whatever domain the wallet contract defines.
Things to know
- Status: Final, but it builds on ERC-8126, and a compliant wallet MUST check the agent's ERC-8126 score before every action.
- Enforce nonces and expiry, or signed actions can be replayed.
- Host manipulation is reduced, not eliminated. The spec recommends using several independent hosts for high-value agents.
- The spec names some open questions, including gas-efficient audit roots and threshold-based containment.
- For agent identity and reputation registries more broadly, see ERC-8004.