ERC-8004: an on-chain identity for an AI agent
ERC-8004 gives an agent a token id that points to a file saying what it is and how to reach it, plus a registry for feedback. How the pieces fit.
A wallet holds an ERC-721 token. It looks like a collectible, but it is an agent's identity: a number on chain that says which agent this is, where its description lives, and where others have recorded how working with it went. That is the idea behind ERC-8004.
A draft standard for finding and trusting agents
ERC-8004, Trustless Agents, is a draft standard to discover agents and establish trust through reputation and validation. Protocols like MCP describe what an agent can do once a client has found it. ERC-8004 covers the step before: finding the agent at all, and deciding whether to trust it. It defines identity, reputation and validation registries that can be deployed as per-chain singletons.
The identity registry
The identity registry is an ERC-721 contract with URI storage. Registering mints a token:
function register(string calldata agentURI) external returns (uint256 agentId);The agentId is the token id, assigned incrementally: each new agent gets the next number. The token owner owns the agent, and can transfer it or let an operator update its details. Globally, an agent is identified by its registry, written as eip155:<chainId>:<registryAddress>, together with its agent id.
The registration file
The token's URI points to a registration file. It can be served over HTTPS, stored on IPFS, or embedded on chain as a base64 data URI. An abridged example with illustrative values:
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "myAgentName",
"description": "What the agent does and how to use it",
"services": [
{ "name": "MCP", "endpoint": "https://mcp.example/", "version": "2025-06-18" }
],
"x402Support": true,
"active": true,
"registrations": [
{ "agentId": 22, "agentRegistry": "eip155:1:0x..." }
]
}So the token answers who, and the file answers how: a name, the endpoints to reach the agent, and whether it takes x402 payments.
The reputation registry
A client other than the agent's owner or an approved operator can submit feedback for a registered agent:
function giveFeedback(
uint256 agentId,
int128 value,
uint8 valueDecimals,
string calldata tag1,
string calldata tag2,
string calldata endpoint,
string calldata feedbackURI,
bytes32 feedbackHash
) external;Pass all eight arguments. Supply the registered agentId, the signed value and a valueDecimals from 0 to 18. Use empty strings for unused text fields and bytes32(0) for an omitted hash. Tags let a client say what was measured, such as uptime or a quality rating, and an optional file URI with its hash can hold the detail. An owner cannot rate its own agent through the owner or operator keys, but nothing stops feedback from fresh addresses, so weigh who gave it.
The validation registry
The third registry is meant for independent checks of an agent's work, such as re-running a job or a TEE attestation. The reference deployment's README says this part is still under active update and discussion, and no validation registry address is listed there at the time of writing.
One address everywhere
The reference contracts use the same identity registry address, 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432, and the same reputation registry address on every mainnet they list. A client that knows one address can reach the registry on any of those chains, though each chain's registry assigns agent IDs independently.
How Cleave Protocol is registered
Cleave is registered as an ERC-8004 agent, under the name Cleave for Agents, on all six chains it serves. On Base its agent id is 1135050. Its registration file lists every one of its registrations, its MCP endpoint and its x402 support.
After a successful trade, agents can leave feedback on the ERC-8004 reputation registry for agent id 1135050 on Base. Read any rating with care: it records what others reported, and it is not a promise of anything.
Token: who. File: how. Feedback: how it went.
Every registration, with its chain and agent id, is on the Discovery docs page.