ERC-8004 Trustless agents

Draft · Other · created 2025-08-13

A standard that registers AI agents on the blockchain so they can be discovered and selected across organizational boundaries. With three registries for identity, reputation, and validation, agents can be transacted with even without prior trust.

Why it is needed

Protocols for communication between AI agents, such as MCP (Model Context Protocol) and A2A (Agent2Agent), exist, but these protocols do not address how to discover agents or how far to trust them. To delegate work to an agent from an unfamiliar organization, a common mechanism is needed to verify who the agent is, whether it has performed well in the past, and whether its results are correct. Without such a mechanism, the agent economy remains confined to closed transactions among organizations that already know each other. This standard places three lightweight registries, for identity, reputation, and validation, on the blockchain so that agents can be discovered, selected, and interacted with even without prior trust. The trust method can be chosen and is designed to be tiered, applying security proportional to the value at stake, from low-risk tasks like ordering a pizza to high-risk tasks like medical diagnosis.

What to implement

In depth

Identity Registry: ERC-721-based agent identity

The Identity Registry extends ERC-721 with the URIStorage extension to register agents. The original text calls ERC-721's tokenId the agentId and tokenURI the agentURI. An agent's global identifier is the combination of the agentRegistry string {namespace}:{chainId}:{identityRegistry} (e.g. eip155:1:0x742...) and the agentId, which the registry assigns incrementally. The token owner is the agent's owner and can transfer ownership or delegate management such as updating the registration file to an operator. register() has three overloads, and registration emits one Transfer event, one MetadataSet event for the reserved key agentWallet, a MetadataSet event for each additional metadata entry, and a Registered event. Because it is ERC-721-based, all agents can be queried and transferred directly in NFT-compatible apps.

Registration file structure and domain verification

agentURI must link to a registration file, and any URI scheme can be used, including ipfs://, https://, and base64-encoded data: URIs. The type, name, description, and image fields at the top of the file exist for compatibility with ERC-721 apps. The services list can include as many endpoints as desired, such as web, A2A agent cards, MCP endpoints, OASF, ENS names, DIDs, and email, and the version field is a recommendation. registrations contains the agentId and agentRegistry, and all fields in a registration entry are required. supportedTrust is optional; if it is absent or empty, this standard is used only for discovery, not trust. Since an endpoint may point to a domain not owned by the agent owner, domain control can be proven by posting a registrations entry matching the on-chain agent at that domain's /.well-known/agent-registration.json.

On-chain metadata and agentWallet

The registry supports optional on-chain metadata via getMetadata(uint256 agentId, string metadataKey) and setMetadata(uint256 agentId, string metadataKey, bytes metadataValue). The key agentWallet is reserved and cannot be set via setMetadata() or the metadata array in register(). This key represents the address where the agent receives payment, and it is initially set to the owner's address. To change it, call setAgentWallet(agentId, newWallet, deadline, signature), proving control with a valid signature for the new wallet (EIP-712 for EOAs, ERC-1271 for contract wallets). When an agent is transferred, agentWallet is automatically cleared, effectively resetting it to the zero address, and the new owner must verify it again.

Reputation Registry: writing feedback

Any clientAddress can leave feedback via giveFeedback(). Values are expressed as a signed fixed-point value (int128) and valueDecimals (uint8, 0 to 18); for example, 99.77% uptime is written as value 9977 with valueDecimals 2. The submitter must not be the owner or an approved operator of the given agentId. tag1, tag2, endpoint, feedbackURI, and feedbackHash are optional, and feedbackHash is the KECCAK-256 hash of the content pointed to by feedbackURI, ensuring integrity. The hash can be omitted if the URI is content-addressed, as with IPFS. The contract stores value, valueDecimals, tag1, tag2, and isRevoked together with a per-client feedbackIndex starting at 1; endpoint, feedbackURI, and feedbackHash are only emitted in events and are not stored. Feedback can be revoked with revokeFeedback(), and anyone can append a response, such as proof of a refund or a spam flag, with appendResponse().

Division of roles between reading and aggregating reputation

getSummary() requires both agentId and clientAddresses, and clientAddresses cannot be left empty, because aggregated results not filtered by client are exposed to Sybil and spam attacks. readAllFeedback() requires only agentId; the rest are optional filters, and revoked feedback is excluded by default. getClients() and getLastIndex() can be used to query the list of addresses that left feedback and the last index. The original text explains that simple filtering by reviewer and tag is supported on-chain, but more complex reputation aggregation is expected to happen off-chain. If the party leaving feedback is itself an agent, it is recommended to use the address set in the on-chain agentWallet metadata as the clientAddress, to make reputation aggregation easier.

Validation Registry: requests and responses

An agent's owner or operator requests validation via validationRequest(). requestURI points to off-chain data containing all the inputs and outputs needed for validation, and requestHash is the keccak256 commitment to that data and also serves as the request's identifier. Only the validatorAddress designated in the request can leave a response via validationResponse(). response is a value from 0 to 100, which can be used as a binary verdict where 0 is fail and 100 is pass, or as an intermediate value to express a spectrum of verdicts. The same requestHash can receive multiple responses, allowing staged validation states such as soft finality and hard finality, or status updates, using tags. The contract stores requestHash, validatorAddress, agentId, response, responseHash, lastUpdate, and tag, enabling on-chain querying and composition. Validators can use mechanisms such as stake-backed re-execution, zkML verifiers, TEE oracles, or trusted arbiters, and rewards and slashing are left to the individual validation protocol.

Design rationale, deployment approach, and proposal status

According to the original Rationale section, this standard anticipates that communication protocols beyond MCP and A2A may emerge, so it adopts a structure where a flexible registration file is linked from the blockchain, to which endpoints can be freely added. Since clients do not need to register, EIP-7702 can be used to implement frictionless feedback, and because feedback is recorded on-chain and the full data is recommended to live on IPFS, building a subgraph indexer is straightforward. The registry is expected to be deployed as a singleton per chain; an agent registered on one chain may be active on another, and it may also be registered redundantly on multiple chains. Payment is a separate matter from this protocol and is not covered by the standard. This proposal is still in Draft status, so its content may change.

Things to watch out for

Original ERC · ← ERCs