{"eip":8226,"title":"Regulated Agent Mandate","description":"A compliance delegation layer for AI agents operating on tokenized regulated assets.","authors":["Ludovico Rossi (@ludovicor-eth) \u003cludovico@brickken.com\u003e","Dario Lo Buglio (@xaler5) \u003cdario@brickken.com\u003e","Thamer Dridi (@thamerdridi) \u003cthamer@brickken.com\u003e","Nabil El Alami Khalifi (@nabil-brickken) \u003cnabil@brickken.com\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2026-04-12","requires":[165,712,1271],"discussionsTo":"https://ethereum-magicians.org/t/erc-8226-regulated-agent-mandate/28208","repo":"ERCs","label":"ERC-8226","officialUrl":"https://eips.ethereum.org/EIPS/eip-8226","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8226.md","url":"https://eips.huatuo.xyz/eip-8226/","tldr":{"en":"Proposes an on-chain mandate registry so a KYC-verified investor can give an AI agent scoped, time-limited, capped authority over a regulated token, and the token can check that mandate before every agent action.","ja":"KYC 済みの投資家が、AI エージェントに規制対象トークンに対するスコープ・期限・上限付きの権限を与えられるオンチェーンのマンデートレジストリを提案する。トークンは、エージェントの操作のたびにそのマンデートを確認できる。","ko":"KYC를 마친 투자자가 AI 에이전트에게 규제 대상 토큰에 대한 범위·기간·한도가 정해진 권한을 부여할 수 있는 온체인 위임(mandate) 레지스트리를 제안한다. 토큰은 에이전트의 모든 행동 전에 그 위임을 확인할 수 있다.","zh":"提出一个链上授权（mandate）注册表，使通过 KYC 的投资者可以授予 AI 智能体对受监管代币的、有范围、有时限、有上限的权限，代币可以在每次智能体操作之前检查该授权。"},"tags":["ai-agents","rwa","compliance","delegation","permissions"],"explainers":{"en":{"lang":"en","tldr":"Proposes an on-chain mandate registry so a KYC-verified investor can give an AI agent scoped, time-limited, capped authority over a regulated token, and the token can check that mandate before every agent action.","tags":["ai-agents","rwa","compliance","delegation","permissions"],"related":[7943,3643,8004,712,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8226/","markdown":"## What problem does it solve?\n\nAI agents are starting to manage portfolios that include tokenized regulated assets (fund units, securities). For an agent to buy or move such a token for an investor, three things need to hold at once: the investor is a verified, compliance-cleared identity; the agent's authority is traceable, time-bounded and capped (the spec compares it to a power of attorney); and the token contract can check that authority atomically when the action happens.\n\nRegulated token standards such as [ERC-7943](/eip-7943/) and [ERC-3643](/eip-3643/) decide *who may hold* a token, and agent registries such as [ERC-8004](/eip-8004/) say *which agents exist*, but nothing defines *what this agent may do for this investor*. ERC-8226 (RAMS, Regulated Agent Mandate Standard) fills that layer.\n\n## How it works\n\nTwo interfaces, ideally run by different operators:\n\n- **`IComplianceProvider`** (e.g. a KYC provider adapter) grants and revokes principal eligibility and answers `checkPrincipal(principal, identityRef)` with `eligible`, a `ReasonCode` (`KYC_EXPIRED`, `AML_FLAG`, `JURISDICTION_BLOCKED`, …) and an `expiresAt`.\n- **`IAgentMandate`** (the RAMS registry) stores one active mandate per `(agent, principal, asset)` with a validity window, a per-transaction cap, a cumulative cap, a list of enabled `bytes32` action labels and the compliance provider used.\n\nThe lifecycle:\n\n1. The principal calls `grantMandate` directly or signs it as [EIP-712](/eip-712/) typed data (domain name `\"RAMS\"`), verified with [ERC-1271](/eip-1271/) so multisigs and smart wallets work. The registry checks the principal is eligible and that the mandate does not outlive their compliance window.\n2. Before an agent action, the token (or an executor) calls `canExecute(agent, principal, asset, action, amount)`, which returns `ok` plus the *first* failing reason: `NONEXISTENT`, `AGENT_FROZEN`, `PRINCIPAL_FROZEN`, `NOT_YET_VALID`, `EXPIRED`, `REVOKED`, `ACTION_NOT_ENABLED`, `OVER_TX_CAP` or `OVER_CUMULATIVE_CAP`.\n3. After the action, `recordExecution` adds the amount to `cumulativeUsed`.\n\nThe principal (or an approved operator) can revoke or extend; extending never resets the used amount. Authorised enforcers can freeze an agent or a principal, but cannot revoke a mandate.\n\n## Sample code\n\nGating an ERC-20 style `transferFrom` on a regulated token, adapted from the spec's reference modifier:\n\n```solidity\n// `rams` is the IAgentMandate registry address held by the token\nerror MandateBlocked(IAgentMandate.MandateReason reason);\n\nmodifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {\n    bytes32 action = bytes32(selector);          // left-aligned selector as the label\n    bool agentCall = msg.sender != holder;\n    if (agentCall) {\n        (bool ok, IAgentMandate.MandateReason reason) =\n            rams.canExecute(msg.sender, holder, address(this), action, amount);\n        if (!ok) revert MandateBlocked(reason);\n    }\n    _;\n    if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);\n}\n\nfunction transferFrom(address from, address to, uint256 value)\n    public override\n    gatedByMandate(IERC20.transferFrom.selector, from, value)\n    returns (bool)\n{\n    return super.transferFrom(from, to, value);\n}\n```\n\n## Things to know\n\n- Status is **Draft**.\n- A mandate does not replace the token's own allowance or operator approval; both must pass.\n- Eligibility is only checked at grant and extend time, not on every transfer, so a provider outage cannot freeze trading. A principal who loses eligibility mid-mandate is stopped by the token's own eligibility check (where it has one) or by an enforcer freeze.\n- Caps are in the asset's own units (token amount, or 1 per NFT transfer), not fiat, and are per mandate, not per principal overall.\n- Already-deployed tokens cannot gate themselves; for them the spec describes enforcement through an executor contract or an [EIP-7702](/eip-7702/)-delegated account.\n- Whether a given mandate setup satisfies a particular regulator is outside the standard and needs legal review.\n"},"ja":{"lang":"ja","tldr":"KYC 済みの投資家が、AI エージェントに規制対象トークンに対するスコープ・期限・上限付きの権限を与えられるオンチェーンのマンデートレジストリを提案する。トークンは、エージェントの操作のたびにそのマンデートを確認できる。","tags":["ai-agents","rwa","compliance","delegation","permissions"],"related":[7943,3643,8004,712,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8226/","markdown":"## 何を解決するのか\n\nAI エージェントは、トークン化された規制対象資産（ファンド持分、証券）を含むポートフォリオを管理し始めています。エージェントが投資家に代わってそうしたトークンを購入したり移動したりするには、3 つのことが同時に成り立つ必要があります。投資家が検証済みでコンプライアンス審査を通ったアイデンティティであること。エージェントの権限が追跡可能で、期限があり、上限があること（仕様は委任状にたとえています）。そして、トークンコントラクトが、その操作が行われる時点でアトミックにその権限を確認できることです。\n\n[ERC-7943](/eip-7943/) や [ERC-3643](/eip-3643/) のような規制トークン標準は、*誰がトークンを保有できるか*を決め、[ERC-8004](/eip-8004/) のようなエージェントレジストリは、*どのエージェントが存在するか*を示しますが、*このエージェントがこの投資家のために何をしてよいか*を定義するものはありませんでした。ERC-8226（RAMS、Regulated Agent Mandate Standard）が、その層を埋めます。\n\n## 仕組み\n\n2 つのインターフェースがあり、理想的には別々の事業者が運用します。\n\n- **`IComplianceProvider`**（たとえば KYC プロバイダーのアダプター）は、本人（プリンシパル）の適格性を付与・取り消し、`checkPrincipal(principal, identityRef)` に対して `eligible`、`ReasonCode`（`KYC_EXPIRED`、`AML_FLAG`、`JURISDICTION_BLOCKED` など）、`expiresAt` を返します。\n- **`IAgentMandate`**（RAMS レジストリ）は、`(agent, principal, asset)` ごとに有効なマンデートを 1 つ保存します。有効期間、トランザクションごとの上限、累積の上限、有効化された `bytes32` のアクションラベルのリスト、使用するコンプライアンスプロバイダーを含みます。\n\nライフサイクル:\n\n1. プリンシパルは `grantMandate` を直接呼び出すか、[EIP-712](/eip-712/) の型付きデータ（ドメイン名 `\"RAMS\"`）として署名します。マルチシグやスマートウォレットも使えるよう、[ERC-1271](/eip-1271/) で検証されます。レジストリは、プリンシパルが適格であること、およびマンデートがそのコンプライアンスの有効期間より長く続かないことを確認します。\n2. エージェントの操作の前に、トークン（または実行者）が `canExecute(agent, principal, asset, action, amount)` を呼び出し、`ok` と、*最初に*失敗した理由（`NONEXISTENT`、`AGENT_FROZEN`、`PRINCIPAL_FROZEN`、`NOT_YET_VALID`、`EXPIRED`、`REVOKED`、`ACTION_NOT_ENABLED`、`OVER_TX_CAP`、`OVER_CUMULATIVE_CAP`）を返します。\n3. 操作の後、`recordExecution` が `cumulativeUsed` に金額を加算します。\n\nプリンシパル（または承認されたオペレーター）は、取り消しや延長ができます。延長しても使用済みの金額はリセットされません。権限を持つエンフォーサーは、エージェントやプリンシパルを凍結できますが、マンデートを取り消すことはできません。\n\n## サンプルコード\n\n規制トークンでの ERC-20 形式の `transferFrom` をゲートする例。仕様のリファレンス modifier を改変したものです。\n\n```solidity\n// `rams` is the IAgentMandate registry address held by the token\nerror MandateBlocked(IAgentMandate.MandateReason reason);\n\nmodifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {\n    bytes32 action = bytes32(selector);          // left-aligned selector as the label\n    bool agentCall = msg.sender != holder;\n    if (agentCall) {\n        (bool ok, IAgentMandate.MandateReason reason) =\n            rams.canExecute(msg.sender, holder, address(this), action, amount);\n        if (!ok) revert MandateBlocked(reason);\n    }\n    _;\n    if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);\n}\n\nfunction transferFrom(address from, address to, uint256 value)\n    public override\n    gatedByMandate(IERC20.transferFrom.selector, from, value)\n    returns (bool)\n{\n    return super.transferFrom(from, to, value);\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。\n- マンデートは、トークン自体の allowance やオペレーターの承認に取って代わるものではありません。両方を通過する必要があります。\n- 適格性は、付与時と延長時にのみ確認され、転送のたびには確認されません。そのため、プロバイダーの障害で取引が凍結されることはありません。マンデートの途中で適格性を失ったプリンシパルは、トークン自身の適格性チェック（ある場合）か、エンフォーサーによる凍結で止められます。\n- 上限は、法定通貨ではなく資産自身の単位（トークン数量、または NFT の転送 1 回につき 1）で、プリンシパル全体ではなくマンデートごとです。\n- すでにデプロイされたトークンは自らゲートできません。それらについて、仕様は実行者コントラクトや [EIP-7702](/eip-7702/) で委任されたアカウントを通じた強制を説明しています。\n- 特定のマンデート設定が、特定の規制当局の要件を満たすかどうかは標準の範囲外で、法務レビューが必要です。\n"},"ko":{"lang":"ko","tldr":"KYC를 마친 투자자가 AI 에이전트에게 규제 대상 토큰에 대한 범위·기간·한도가 정해진 권한을 부여할 수 있는 온체인 위임(mandate) 레지스트리를 제안한다. 토큰은 에이전트의 모든 행동 전에 그 위임을 확인할 수 있다.","tags":["ai-agents","rwa","compliance","delegation","permissions"],"related":[7943,3643,8004,712,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8226/","markdown":"## 어떤 문제를 해결하나요?\n\nAI 에이전트는 토큰화된 규제 자산(펀드 지분, 증권)이 포함된 포트폴리오를 관리하기 시작했습니다. 에이전트가 투자자를 대신해 그런 토큰을 사거나 옮기려면 세 가지가 동시에 성립해야 합니다. 투자자가 검증되고 컴플라이언스를 통과한 신원일 것, 에이전트의 권한이 추적 가능하고 기간이 있으며 한도가 있을 것(명세는 이를 위임장에 비유합니다), 그리고 토큰 컨트랙트가 행동이 일어나는 시점에 그 권한을 원자적으로 확인할 수 있을 것입니다.\n\n[ERC-7943](/eip-7943/), [ERC-3643](/eip-3643/) 같은 규제 토큰 표준은 *누가 토큰을 보유할 수 있는지*를 정하고, [ERC-8004](/eip-8004/) 같은 에이전트 레지스트리는 *어떤 에이전트가 존재하는지*를 알려 주지만, *이 에이전트가 이 투자자를 위해 무엇을 할 수 있는지*를 정의하는 것은 없었습니다. ERC-8226(RAMS, Regulated Agent Mandate Standard)이 그 계층을 채웁니다.\n\n## 어떻게 동작하나요?\n\n두 개의 인터페이스가 있으며, 이상적으로는 서로 다른 운영자가 운영합니다.\n\n- **`IComplianceProvider`**(예: KYC 제공자 어댑터)는 본인(principal)의 자격을 부여하고 취소하며, `checkPrincipal(principal, identityRef)`에 대해 `eligible`, `ReasonCode`(`KYC_EXPIRED`, `AML_FLAG`, `JURISDICTION_BLOCKED` 등), `expiresAt`을 응답합니다.\n- **`IAgentMandate`**(RAMS 레지스트리)는 `(agent, principal, asset)`마다 하나의 활성 위임을 저장합니다. 유효 기간, 트랜잭션당 한도, 누적 한도, 활성화된 `bytes32` 액션 레이블 목록, 사용하는 컴플라이언스 제공자가 포함됩니다.\n\n수명 주기:\n\n1. 본인은 `grantMandate`를 직접 호출하거나 [EIP-712](/eip-712/) 타입 데이터(도메인 이름 `\"RAMS\"`)로 서명하며, 멀티시그와 스마트 지갑도 쓸 수 있도록 [ERC-1271](/eip-1271/)로 검증합니다. 레지스트리는 본인이 적격인지, 그리고 위임이 본인의 컴플라이언스 유효 기간보다 오래 지속되지 않는지 확인합니다.\n2. 에이전트의 행동 전에 토큰(또는 실행자)이 `canExecute(agent, principal, asset, action, amount)`를 호출하며, 이는 `ok`와 *처음으로* 실패한 이유(`NONEXISTENT`, `AGENT_FROZEN`, `PRINCIPAL_FROZEN`, `NOT_YET_VALID`, `EXPIRED`, `REVOKED`, `ACTION_NOT_ENABLED`, `OVER_TX_CAP`, `OVER_CUMULATIVE_CAP`)를 반환합니다.\n3. 행동 후 `recordExecution`이 `cumulativeUsed`에 금액을 더합니다.\n\n본인(또는 승인된 운영자)은 취소하거나 연장할 수 있으며, 연장해도 사용한 금액은 초기화되지 않습니다. 권한을 가진 집행자는 에이전트나 본인을 동결할 수 있지만 위임을 취소할 수는 없습니다.\n\n## 샘플 코드\n\n규제 토큰에서 ERC-20 방식 `transferFrom`을 게이팅하는 예로, 명세의 레퍼런스 modifier를 각색한 것입니다.\n\n```solidity\n// `rams` is the IAgentMandate registry address held by the token\nerror MandateBlocked(IAgentMandate.MandateReason reason);\n\nmodifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {\n    bytes32 action = bytes32(selector);          // left-aligned selector as the label\n    bool agentCall = msg.sender != holder;\n    if (agentCall) {\n        (bool ok, IAgentMandate.MandateReason reason) =\n            rams.canExecute(msg.sender, holder, address(this), action, amount);\n        if (!ok) revert MandateBlocked(reason);\n    }\n    _;\n    if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);\n}\n\nfunction transferFrom(address from, address to, uint256 value)\n    public override\n    gatedByMandate(IERC20.transferFrom.selector, from, value)\n    returns (bool)\n{\n    return super.transferFrom(from, to, value);\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다.\n- 위임은 토큰 자체의 allowance나 운영자 승인을 대체하지 않습니다. 둘 다 통과해야 합니다.\n- 적격성은 부여 및 연장 시점에만 확인되고 전송마다 확인되지는 않으므로, 제공자 장애로 거래가 동결되지 않습니다. 위임 도중 적격성을 잃은 본인은 토큰 자체의 적격성 검사(있는 경우)나 집행자의 동결로 막힙니다.\n- 한도는 법정화폐가 아니라 자산 자체의 단위(토큰 수량 또는 NFT 전송당 1)이며, 본인 전체가 아니라 위임별로 적용됩니다.\n- 이미 배포된 토큰은 스스로 게이팅할 수 없습니다. 그런 토큰에 대해 명세는 실행자 컨트랙트나 [EIP-7702](/eip-7702/)로 위임된 계정을 통한 집행을 설명합니다.\n- 특정 위임 구성이 특정 규제 기관의 요건을 충족하는지는 표준의 범위 밖이며 법률 검토가 필요합니다.\n"},"zh":{"lang":"zh","tldr":"提出一个链上授权（mandate）注册表，使通过 KYC 的投资者可以授予 AI 智能体对受监管代币的、有范围、有时限、有上限的权限，代币可以在每次智能体操作之前检查该授权。","tags":["ai-agents","rwa","compliance","delegation","permissions"],"related":[7943,3643,8004,712,1271],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8226/","markdown":"## 它解决什么问题？\n\nAI 智能体开始管理包含代币化受监管资产（基金份额、证券）的投资组合。要让智能体替投资者购买或转移这类代币，三件事必须同时成立：投资者是经过验证、通过合规审查的身份；智能体的权限可追溯、有时限、有上限（规范将其比作委托书）；并且代币合约能在操作发生时以原子方式检查这一权限。\n\n[ERC-7943](/eip-7943/) 和 [ERC-3643](/eip-3643/) 等受监管代币标准决定*谁可以持有*代币，[ERC-8004](/eip-8004/) 等智能体注册表说明*存在哪些智能体*，但没有任何标准定义*这个智能体可以为这位投资者做什么*。ERC-8226（RAMS，Regulated Agent Mandate Standard）填补了这一层。\n\n## 它如何运作\n\n两个接口，理想情况下由不同的运营方运行：\n\n- **`IComplianceProvider`**（例如 KYC 提供方的适配器）授予和撤销委托人（principal）的资格，并针对 `checkPrincipal(principal, identityRef)` 返回 `eligible`、一个 `ReasonCode`（`KYC_EXPIRED`、`AML_FLAG`、`JURISDICTION_BLOCKED`……）以及 `expiresAt`。\n- **`IAgentMandate`**（RAMS 注册表）为每个 `(agent, principal, asset)` 存储一份有效的授权，包含有效期、单笔交易上限、累计上限、已启用的 `bytes32` 动作标签列表，以及所使用的合规提供方。\n\n生命周期：\n\n1. 委托人直接调用 `grantMandate`，或将其签署为 [EIP-712](/eip-712/) 类型化数据（域名 `\"RAMS\"`），并用 [ERC-1271](/eip-1271/) 验证，因此多签和智能钱包也可使用。注册表会检查委托人是否合格，以及授权的存续时间是否不超过其合规有效期。\n2. 在智能体执行操作之前，代币（或执行者）调用 `canExecute(agent, principal, asset, action, amount)`，返回 `ok` 以及*第一个*失败的原因：`NONEXISTENT`、`AGENT_FROZEN`、`PRINCIPAL_FROZEN`、`NOT_YET_VALID`、`EXPIRED`、`REVOKED`、`ACTION_NOT_ENABLED`、`OVER_TX_CAP` 或 `OVER_CUMULATIVE_CAP`。\n3. 操作完成后，`recordExecution` 把金额加到 `cumulativeUsed` 上。\n\n委托人（或获批准的操作者）可以撤销或延期；延期不会重置已用金额。获授权的执行者（enforcer）可以冻结某个智能体或某个委托人，但不能撤销授权。\n\n## 示例代码\n\n在受监管代币上，对 ERC-20 风格的 `transferFrom` 进行门控，改编自规范的参考 modifier：\n\n```solidity\n// `rams` is the IAgentMandate registry address held by the token\nerror MandateBlocked(IAgentMandate.MandateReason reason);\n\nmodifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {\n    bytes32 action = bytes32(selector);          // left-aligned selector as the label\n    bool agentCall = msg.sender != holder;\n    if (agentCall) {\n        (bool ok, IAgentMandate.MandateReason reason) =\n            rams.canExecute(msg.sender, holder, address(this), action, amount);\n        if (!ok) revert MandateBlocked(reason);\n    }\n    _;\n    if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);\n}\n\nfunction transferFrom(address from, address to, uint256 value)\n    public override\n    gatedByMandate(IERC20.transferFrom.selector, from, value)\n    returns (bool)\n{\n    return super.transferFrom(from, to, value);\n}\n```\n\n## 需要注意\n\n- 状态为 **Draft**。\n- 授权不能取代代币自身的 allowance 或操作者批准；两者都必须通过。\n- 资格只在授予和延期时检查，而不是每次转账都检查，因此提供方故障不会冻结交易。授权期间失去资格的委托人，会被代币自身的资格检查（如果有的话）或执行者的冻结所拦截。\n- 上限以资产自身的单位计（代币数量，或每次 NFT 转移计为 1），而不是法币，并且是按每份授权计，而不是按委托人的总体计。\n- 已经部署的代币无法自行实现门控；对于它们，规范描述了通过执行者合约或 [EIP-7702](/eip-7702/) 委托账户来实施的方式。\n- 某个授权配置能否满足特定监管机构的要求，不在标准范围之内，需要法律审查。\n"}}}
