{"eip":8196,"title":"AI Agent Authenticated Wallet","description":"Policy-bound transaction execution and verifiable credential delegation for autonomous AI agents","authors":["Leigh Cronian (@cybercentry) \u003cleigh.cronian@cybercentry.co.uk\u003e","Chris Johnson \u003cchris@virtuals.io\u003e"],"status":"Final","type":"Standards Track","category":"ERC","created":"2026-03-14","requires":[155,191,712,4337,8126],"discussionsTo":"https://ethereum-magicians.org/t/erc-8196-ai-agent-authenticated-wallet/27987","repo":"ERCs","label":"ERC-8196","officialUrl":"https://eips.ethereum.org/EIPS/eip-8196","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8196.md","url":"https://eips.huatuo.xyz/eip-8196/","tldr":{"en":"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.","ja":"AI エージェントが、オーナーが定義し署名したポリシー（支出上限、コントラクトのアローリスト、有効期限、ハッシュチェーン化された監査証跡）の範囲内でのみユーザーの代理として動作できるようにする、スマートウォレットのインターフェース。","ko":"AI 에이전트가 소유자가 정의하고 서명한 정책(지출 한도, 컨트랙트 허용 목록, 만료 시각, 해시 체인 감사 기록) 안에서만 사용자를 대신해 행동하게 하는 스마트 지갑 인터페이스.","zh":"一种智能钱包接口，让 AI 智能体只能在所有者定义并签名的策略范围内代表用户行事，策略包括支出限额、合约白名单、过期时间以及哈希链式的审计轨迹。"},"tags":["ai-agents","wallet","delegation","policy","account-abstraction"],"explainers":{"en":{"lang":"en","tldr":"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.","tags":["ai-agents","wallet","delegation","policy","account-abstraction"],"related":[8126,4337,712,8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8196/","markdown":"## What problem does it solve?\n\nLetting 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.\n\nERC-8196 defines the \"execute\" layer of a two-part trust stack:\n\n| Layer | Standard | Question |\n| --- | --- | --- |\n| 1. Identify and verify | [ERC-8126](/eip-8126/) | Is this agent trustworthy? |\n| 2. Execute | ERC-8196 | Is this action authorized right now? |\n\n## How it works\n\nThe owner registers a **policy** on a smart wallet (typically an [ERC-4337](/eip-4337/) account or a policy module). A policy names the agent and its ERC-8126 `agentId`, and sets:\n\n- `allowedActions` (e.g. `\"transfer\"`, `\"swap\"`), `allowedContracts` and `blockedContracts`;\n- `maxValuePerTx` and an optional `maxValuePerDay` (wei);\n- `validAfter` / `validUntil`;\n- `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).\n\nTo act, the agent signs an [EIP-712](/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.\n\nEach 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.\n\n## Sample code\n\nSigning an agent action with ethers v6:\n\n```ts\nimport { Wallet, ZeroHash } from \"ethers\";\n\nconst agent = new Wallet(process.env.AGENT_KEY!);\nconst domain = { name: \"AgentWallet\", version: \"1\", chainId: 1, verifyingContract: walletAddress };\nconst types = {\n  AgentAction: [\n    { name: \"agent\", type: \"address\" },\n    { name: \"action\", type: \"string\" },\n    { name: \"target\", type: \"address\" },\n    { name: \"value\", type: \"uint256\" },\n    { name: \"data\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n    { name: \"validUntil\", type: \"uint256\" },\n    { name: \"policyHash\", type: \"bytes32\" },\n    { name: \"entropyCommitment\", type: \"bytes32\" },\n  ],\n};\nconst action = {\n  agent: agent.address, action: \"transfer\", target: tokenAddress,\n  value: 0n, data: calldata, nonce: 7n,\n  validUntil: BigInt(Math.floor(Date.now() / 1000) + 300),\n  policyHash, entropyCommitment: ZeroHash,\n};\nconst signature = await agent.signTypedData(domain, types, action);\n// then: wallet.executeAction(policyHash, target, value, data, nonce, entropyCommitment, signature)\n```\n\nThe `domain` values above are placeholders; use whatever domain the wallet contract defines.\n\n## Things to know\n\n- **Status: Final**, but it builds on [ERC-8126](/eip-8126/), and a compliant wallet MUST check the agent's ERC-8126 score before every action.\n- Enforce nonces and expiry, or signed actions can be replayed.\n- Host manipulation is reduced, not eliminated. The spec recommends using several independent hosts for high-value agents.\n- The spec names some open questions, including gas-efficient audit roots and threshold-based containment.\n- For agent identity and reputation registries more broadly, see [ERC-8004](/eip-8004/).\n"},"ja":{"lang":"ja","tldr":"AI エージェントが、オーナーが定義し署名したポリシー（支出上限、コントラクトのアローリスト、有効期限、ハッシュチェーン化された監査証跡）の範囲内でのみユーザーの代理として動作できるようにする、スマートウォレットのインターフェース。","tags":["ai-agents","wallet","delegation","policy","account-abstraction"],"related":[8126,4337,712,8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8196/","markdown":"## 何を解決するのか\n\n自律的な AI エージェントに資金を動かさせるのは危険です。エージェントが秘密鍵を持っていれば、エージェントをホストしている者がそれを盗めます。単にアクセスを委任しただけでは、エージェントの行動に強制力のある制限はなく、何をしたかの信頼できる記録もありません。悪意のあるホストは、気に入った答えが出るまで再サンプリングして確率的モデルを誘導したり、古い承認を再利用したりすることもできます。\n\nERC-8196 は、2 層の信頼スタックのうち「実行」層を定義します。\n\n| 層 | 標準 | 問い |\n| --- | --- | --- |\n| 1. 識別と検証 | [ERC-8126](/eip-8126/) | このエージェントは信頼できるか？ |\n| 2. 実行 | ERC-8196 | この行動は今、承認されているか？ |\n\n## 仕組み\n\nオーナーは、スマートウォレット（通常は [ERC-4337](/eip-4337/) アカウントまたはポリシーモジュール）に**ポリシー**を登録します。ポリシーはエージェントとその ERC-8126 の `agentId` を指定し、次を設定します。\n\n- `allowedActions`（例: `\"transfer\"`、`\"swap\"`）、`allowedContracts`、`blockedContracts`\n- `maxValuePerTx` と、任意の `maxValuePerDay`（wei）\n- `validAfter` / `validUntil`\n- `minVerificationScore`: 受け入れ可能な ERC-8126 のリスクスコアの最悪値（スコアが低いほどリスクが低いため、エージェントのスコアがこの値を*上回る*とアクションは拒否されます）\n\n行動するとき、エージェントは `policyHash`、nonce、有効期限、`entropyCommitment` を含む [EIP-712](/eip-712/) の `AgentAction` に署名します。このコミットメントは、ホストが繰り返しサンプリングしてエージェントを誘導することを難しくするためのコミット・リビール方式の一部です。`executeAction` は署名、ポリシーの上限、エージェントの現在の ERC-8126 スコアを確認してから呼び出しを実行し、監査エントリを記録します。\n\n各監査エントリは直前のエントリのハッシュを含まなければならず（MUST）、改ざんがあればチェーンが壊れます。エントリはオフチェーン（IPFS など）に保存し、Merkle root をオンチェーンにアンカーしてもかまいません。オーナーはいつでも `revokePolicy` を実行できます。\n\n## サンプルコード\n\nethers v6 でエージェントのアクションに署名する例:\n\n```ts\nimport { Wallet, ZeroHash } from \"ethers\";\n\nconst agent = new Wallet(process.env.AGENT_KEY!);\nconst domain = { name: \"AgentWallet\", version: \"1\", chainId: 1, verifyingContract: walletAddress };\nconst types = {\n  AgentAction: [\n    { name: \"agent\", type: \"address\" },\n    { name: \"action\", type: \"string\" },\n    { name: \"target\", type: \"address\" },\n    { name: \"value\", type: \"uint256\" },\n    { name: \"data\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n    { name: \"validUntil\", type: \"uint256\" },\n    { name: \"policyHash\", type: \"bytes32\" },\n    { name: \"entropyCommitment\", type: \"bytes32\" },\n  ],\n};\nconst action = {\n  agent: agent.address, action: \"transfer\", target: tokenAddress,\n  value: 0n, data: calldata, nonce: 7n,\n  validUntil: BigInt(Math.floor(Date.now() / 1000) + 300),\n  policyHash, entropyCommitment: ZeroHash,\n};\nconst signature = await agent.signTypedData(domain, types, action);\n// then: wallet.executeAction(policyHash, target, value, data, nonce, entropyCommitment, signature)\n```\n\n上記の `domain` の値はプレースホルダーです。ウォレットコントラクトが定義するドメインを使ってください。\n\n## 知っておくべきこと\n\n- **ステータス: Final** ですが、[ERC-8126](/eip-8126/) の上に成り立っており、準拠するウォレットは、あらゆるアクションの前にエージェントの ERC-8126 スコアを確認しなければなりません（MUST）。\n- nonce と有効期限を強制してください。そうしないと、署名済みのアクションが再利用される可能性があります。\n- ホストによる操作は軽減されますが、なくなるわけではありません。仕様は、高額を扱うエージェントには複数の独立したホストを使うことを推奨しています。\n- 仕様は、ガス効率のよい監査 root や、しきい値ベースの封じ込めなど、いくつかの未解決の課題を挙げています。\n- エージェントの ID とレピュテーションのレジストリ全般については、[ERC-8004](/eip-8004/) を参照してください。\n"},"ko":{"lang":"ko","tldr":"AI 에이전트가 소유자가 정의하고 서명한 정책(지출 한도, 컨트랙트 허용 목록, 만료 시각, 해시 체인 감사 기록) 안에서만 사용자를 대신해 행동하게 하는 스마트 지갑 인터페이스.","tags":["ai-agents","wallet","delegation","policy","account-abstraction"],"related":[8126,4337,712,8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8196/","markdown":"## 어떤 문제를 해결하나요?\n\n자율적인 AI 에이전트가 자금을 움직이게 하는 것은 위험합니다. 에이전트가 개인 키를 갖고 있다면 에이전트를 호스팅하는 쪽이 그것을 훔칠 수 있습니다. 단순히 접근 권한을 위임하면 에이전트가 하는 일에 강제할 수 있는 제한이 없고, 무엇을 했는지에 대한 신뢰할 만한 기록도 없습니다. 악의적인 호스트는 마음에 드는 답이 나올 때까지 다시 샘플링해서 확률적 모델을 유도하거나, 오래된 승인을 재사용할 수도 있습니다.\n\nERC-8196은 두 부분으로 된 신뢰 스택 중 \"실행\" 계층을 정의합니다.\n\n| 계층 | 표준 | 질문 |\n| --- | --- | --- |\n| 1. 식별 및 검증 | [ERC-8126](/eip-8126/) | 이 에이전트를 신뢰할 수 있는가? |\n| 2. 실행 | ERC-8196 | 이 동작이 지금 승인되었는가? |\n\n## 어떻게 동작하나요?\n\n소유자는 스마트 지갑(보통 [ERC-4337](/eip-4337/) 계정이나 정책 모듈)에 **정책**을 등록합니다. 정책은 에이전트와 그 ERC-8126 `agentId`를 지정하고 다음을 설정합니다.\n\n- `allowedActions`(예: `\"transfer\"`, `\"swap\"`), `allowedContracts`, `blockedContracts`\n- `maxValuePerTx`와 선택적인 `maxValuePerDay`(wei)\n- `validAfter` / `validUntil`\n- `minVerificationScore`: 여전히 허용되는 최악의 ERC-8126 위험 점수(점수가 낮을수록 위험이 낮으므로, 에이전트의 점수가 이 값을 *넘으면* 동작이 거부됩니다)\n\n행동하려면 에이전트가 `policyHash`, nonce, 만료 시각, `entropyCommitment`를 포함한 [EIP-712](/eip-712/) `AgentAction`에 서명합니다. 이 커밋먼트는 호스트가 반복 샘플링으로 에이전트를 유도하기 어렵게 하려는 커밋-리빌 방식의 일부입니다. `executeAction`은 서명, 정책 한도, 에이전트의 현재 ERC-8126 점수를 확인한 다음 호출을 수행하고 감사 항목을 기록합니다.\n\n각 감사 항목은 반드시(MUST) 이전 항목의 해시를 담아야 하므로, 변조가 있으면 체인이 깨집니다. 항목은 오프체인(예: IPFS)에 저장하고 Merkle 루트를 온체인에 고정할 수 있습니다. 소유자는 언제든 `revokePolicy`를 호출할 수 있습니다.\n\n## 샘플 코드\n\nethers v6로 에이전트 동작에 서명하는 예시:\n\n```ts\nimport { Wallet, ZeroHash } from \"ethers\";\n\nconst agent = new Wallet(process.env.AGENT_KEY!);\nconst domain = { name: \"AgentWallet\", version: \"1\", chainId: 1, verifyingContract: walletAddress };\nconst types = {\n  AgentAction: [\n    { name: \"agent\", type: \"address\" },\n    { name: \"action\", type: \"string\" },\n    { name: \"target\", type: \"address\" },\n    { name: \"value\", type: \"uint256\" },\n    { name: \"data\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n    { name: \"validUntil\", type: \"uint256\" },\n    { name: \"policyHash\", type: \"bytes32\" },\n    { name: \"entropyCommitment\", type: \"bytes32\" },\n  ],\n};\nconst action = {\n  agent: agent.address, action: \"transfer\", target: tokenAddress,\n  value: 0n, data: calldata, nonce: 7n,\n  validUntil: BigInt(Math.floor(Date.now() / 1000) + 300),\n  policyHash, entropyCommitment: ZeroHash,\n};\nconst signature = await agent.signTypedData(domain, types, action);\n// then: wallet.executeAction(policyHash, target, value, data, nonce, entropyCommitment, signature)\n```\n\n위의 `domain` 값은 자리 표시자입니다. 지갑 컨트랙트가 정의한 도메인을 사용하세요.\n\n## 알아둘 점\n\n- **상태: Final**이지만 [ERC-8126](/eip-8126/)을 기반으로 하며, 규격을 따르는 지갑은 모든 동작 전에 에이전트의 ERC-8126 점수를 반드시(MUST) 확인해야 합니다.\n- nonce와 만료 시각을 강제하세요. 그렇지 않으면 서명된 동작이 재사용될 수 있습니다.\n- 호스트의 조작은 줄어들 뿐 없어지지는 않습니다. 스펙은 고가치 에이전트에는 서로 독립된 여러 호스트를 사용하라고 권장합니다.\n- 스펙은 가스 효율적인 감사 루트와 임계값 기반 격리 등 몇 가지 미해결 질문을 언급합니다.\n- 에이전트 신원과 평판 레지스트리 전반에 대해서는 [ERC-8004](/eip-8004/)를 참고하세요.\n"},"zh":{"lang":"zh","tldr":"一种智能钱包接口，让 AI 智能体只能在所有者定义并签名的策略范围内代表用户行事，策略包括支出限额、合约白名单、过期时间以及哈希链式的审计轨迹。","tags":["ai-agents","wallet","delegation","policy","account-abstraction"],"related":[8126,4337,712,8004],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8196/","markdown":"## 它解决什么问题？\n\n让自主的 AI 智能体动用资金是有风险的。如果智能体持有私钥，托管该智能体的人就可以窃取它。如果只是简单地委托访问权限，那么对智能体的行为就没有可强制执行的限制，也没有关于它做了什么的可靠记录。恶意的托管方还可以通过反复重新采样来诱导概率模型，直到得到自己想要的答案，或者重放旧的批准。\n\nERC-8196 定义了由两部分组成的信任栈中的\"执行\"层：\n\n| 层 | 标准 | 问题 |\n| --- | --- | --- |\n| 1. 识别与验证 | [ERC-8126](/eip-8126/) | 这个智能体值得信任吗？ |\n| 2. 执行 | ERC-8196 | 这个操作现在是否获得授权？ |\n\n## 它如何运作\n\n所有者在智能钱包（通常是 [ERC-4337](/eip-4337/) 账户或策略模块）上注册一个**策略**。策略指明智能体及其 ERC-8126 的 `agentId`，并设置：\n\n- `allowedActions`（例如 `\"transfer\"`、`\"swap\"`）、`allowedContracts` 和 `blockedContracts`；\n- `maxValuePerTx` 以及可选的 `maxValuePerDay`（wei）；\n- `validAfter` / `validUntil`；\n- `minVerificationScore`：仍可接受的最差 ERC-8126 风险评分（分数越低风险越低，因此当智能体的分数*高于*该值时，操作会被拒绝）。\n\n执行操作时，智能体对一个 [EIP-712](/eip-712/) 的 `AgentAction` 签名，其中包含 `policyHash`、nonce、过期时间和 `entropyCommitment`。该承诺是承诺-揭示（commit-reveal）机制的一部分，目的是让托管方更难通过重复采样来操控智能体。`executeAction` 检查签名、策略限额以及智能体当前的 ERC-8126 评分，然后执行调用并记录一条审计条目。\n\n每条审计条目必须（MUST）包含前一条的哈希，因此任何篡改都会使链断裂。条目可以存储在链下（例如 IPFS），并将 Merkle 根锚定在链上。所有者可以随时调用 `revokePolicy`。\n\n## 示例代码\n\n使用 ethers v6 对智能体操作签名：\n\n```ts\nimport { Wallet, ZeroHash } from \"ethers\";\n\nconst agent = new Wallet(process.env.AGENT_KEY!);\nconst domain = { name: \"AgentWallet\", version: \"1\", chainId: 1, verifyingContract: walletAddress };\nconst types = {\n  AgentAction: [\n    { name: \"agent\", type: \"address\" },\n    { name: \"action\", type: \"string\" },\n    { name: \"target\", type: \"address\" },\n    { name: \"value\", type: \"uint256\" },\n    { name: \"data\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n    { name: \"validUntil\", type: \"uint256\" },\n    { name: \"policyHash\", type: \"bytes32\" },\n    { name: \"entropyCommitment\", type: \"bytes32\" },\n  ],\n};\nconst action = {\n  agent: agent.address, action: \"transfer\", target: tokenAddress,\n  value: 0n, data: calldata, nonce: 7n,\n  validUntil: BigInt(Math.floor(Date.now() / 1000) + 300),\n  policyHash, entropyCommitment: ZeroHash,\n};\nconst signature = await agent.signTypedData(domain, types, action);\n// then: wallet.executeAction(policyHash, target, value, data, nonce, entropyCommitment, signature)\n```\n\n上面的 `domain` 值只是占位符；请使用钱包合约所定义的 domain。\n\n## 需要注意\n\n- **状态：Final**，但它建立在 [ERC-8126](/eip-8126/) 之上，合规的钱包必须（MUST）在每次操作之前检查智能体的 ERC-8126 评分。\n- 必须强制执行 nonce 和过期时间，否则已签名的操作可能被重放。\n- 托管方的操控被减轻，但没有被消除。规范建议对高价值智能体使用多个相互独立的托管方。\n- 规范列出了一些未决问题，包括节省 gas 的审计根和基于阈值的遏制机制。\n- 关于更广泛的智能体身份和声誉注册表，请参见 [ERC-8004](/eip-8004/)。\n"}}}
