---
eip: 8226
label: ERC-8226
title: Regulated Agent Mandate
status: Draft
type: Standards Track
category: ERC
created: 2026-04-12
requires: 165, 712, 1271
official: https://eips.ethereum.org/EIPS/eip-8226
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8226.md
canonical: https://eips.huatuo.xyz/eip-8226/
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]
---

# ERC-8226: Regulated Agent Mandate

> A compliance delegation layer for AI agents operating on tokenized regulated assets.

**TL;DR:** 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.

## What problem does it solve?

AI 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.

Regulated 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.

## How it works

Two interfaces, ideally run by different operators:

- **`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`.
- **`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.

The lifecycle:

1. 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.
2. 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`.
3. After the action, `recordExecution` adds the amount to `cumulativeUsed`.

The 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.

## Sample code

Gating an ERC-20 style `transferFrom` on a regulated token, adapted from the spec's reference modifier:

```solidity
// `rams` is the IAgentMandate registry address held by the token
error MandateBlocked(IAgentMandate.MandateReason reason);

modifier gatedByMandate(bytes4 selector, address holder, uint256 amount) {
    bytes32 action = bytes32(selector);          // left-aligned selector as the label
    bool agentCall = msg.sender != holder;
    if (agentCall) {
        (bool ok, IAgentMandate.MandateReason reason) =
            rams.canExecute(msg.sender, holder, address(this), action, amount);
        if (!ok) revert MandateBlocked(reason);
    }
    _;
    if (agentCall) rams.recordExecution(msg.sender, holder, address(this), action, amount);
}

function transferFrom(address from, address to, uint256 value)
    public override
    gatedByMandate(IERC20.transferFrom.selector, from, value)
    returns (bool)
{
    return super.transferFrom(from, to, value);
}
```

## Things to know

- Status is **Draft**.
- A mandate does not replace the token's own allowance or operator approval; both must pass.
- 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.
- 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.
- Already-deployed tokens cannot gate themselves; for them the spec describes enforcement through an executor contract or an [EIP-7702](/eip-7702/)-delegated account.
- Whether a given mandate setup satisfies a particular regulator is outside the standard and needs legal review.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8226
