Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

ERC-8004 proposes using reputation and validation to discover agents and establish trust without an existing relationship.

This article translates, summarizes, and expands on the proposal below.

Version note: This article follows the November 2025 draft reflected in the Japanese original. The current specification uses services in place of endpoints, exposes setAgentURI(), and represents reputation feedback with signed fixed-point values. It also accepts feedback without the pre-authorization described in this draft, subject to its submitter restrictions. Check the linked specification before implementing these interfaces.

I also cover EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

The protocol proposes using blockchains to discover, select, and interact with autonomous programs and AI agents across organizations. The goal is to let participants work together safely without having to trust each other beforehand, and to support an open agent economy that is independent of any single company or platform.

Its pluggable trust models let developers choose an assurance level appropriate to the stakes. Ordering a pizza might need only a simple trust model, while a task as sensitive as a medical diagnosis would call for much stricter verification.

Trust model How it works
Reputation System Uses client feedback to estimate an agent's reliability.
Stake-Secured Re-execution Other participants re-execute a task to verify the agent's result. They post collateral to deter misconduct.
zkML Proofs / TEE Oracles Verify machine-learning results with zero-knowledge proofs or trusted execution environments. Trusted external computation services can act as oracles.

Choosing a trust model based on each task and its risks gives participants flexibility in how they protect agent-to-agent transactions.

Motivation

MCP (Model Context Protocol) lets servers expose a list of what they offer, including prompts, resources, tools, and completions. The A2A (Agent-to-Agent) protocol handles communication, including authentication, advertising skills through an AgentCard, direct messages, and task management.

These protocols leave a separate question open: how do you find an agent you can trust with a task?

To support collaboration across organizations and individuals, ERC-8004 proposes three lightweight registries. They can be deployed as singleton contracts on Ethereum mainnet or L2 networks.

Identity Registry

The Identity Registry gives an agent a minimal on-chain identifier. It uses the URIStorage extension to ERC-721 to store a link to the agent's registration file. Agents get a unique, portable, censorship-resistant identifier that can establish their presence independently of any particular platform.

Reputation Registry

The Reputation Registry provides a standard interface for submitting and retrieving feedback. Scoring and aggregation can happen on-chain, off-chain, or both.

  • On-chain processing prioritizes transparency and composability with other smart contracts.
  • Off-chain processing can apply more complex algorithms for analysis and scoring.

This leaves room for specialized scoring services, audit networks, and insurance pools.

Validation Registry

The Validation Registry provides a way to request third-party verification and record the results. Validators can check an agent's work using mechanisms such as:

  • Participants who post stake and re-execute the task.
  • Automated verification with zero-knowledge machine learning (zkML).
  • Trusted oracles using a TEE (Trusted Execution Environment).
  • Trusted judges.

These mechanisms give clients ways to independently check the correctness of an agent's output.

Payments

The payment protocol itself is outside the scope of ERC-8004. The proposal uses x402 as an example of how payment evidence could be linked to transaction history and feedback, adding context that makes agent evaluations more credible.

Specification

Identity Registry

Overview

The Identity Registry manages agent registration, identification, and ownership. It combines ERC-721 with URIStorage, so agents can be registered and managed as NFTs. Existing NFT-compatible applications can immediately support browsing and transferring these agents.

Agent identifiers

These fields together identify an agent globally.

Field Description
namespace Uses eip155 for EVM-compatible chains.
chainId Network ID of the blockchain in use.
identityRegistry Address where the ERC-721 registry contract is deployed.
agentId Token ID automatically assigned by the registry.

Here, tokenId is synonymous with agentId. The owner of the token owns the agent and can update its registration file or delegate management permissions using the ERC-721 registry's ownership and approval mechanisms.

For background on EIP-155, see the following article.

[EIP155] Preventing replay attacks across Ethereum networks

Token URI and the agent registration file

The tokenURI points to the agent's registration file. It can use any URI scheme, including ipfs:// or https://.

When registration information changes, a registry built with ERC721URIStorage can update the stored URI using its internal _setTokenURI() function.

The registration file is structured as follows.

json
{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "myAgentName",
  "description": "A natural language description of the Agent, which MAY include what it does, how it works, pricing, and interaction methods",
  "image": "https://example.com/agentimage.png",
  "endpoints": [
    {
      "name": "A2A",
      "endpoint": "https://agent.example/.well-known/agent-card.json",
      "version": "0.3.0"
    },
    {
      "name": "MCP",
      "endpoint": "https://mcp.agent.eth/",
      "capabilities": {},
      "version": "2025-06-18"
    },
    {
      "name": "OASF",
      "endpoint": "ipfs://{cid}",
      "version": "0.7"
    },
    {
      "name": "ENS",
      "endpoint": "vitalik.eth",
      "version": "v1"
    },
    {
      "name": "DID",
      "endpoint": "did:method:foobar",
      "version": "v1"
    },
    {
      "name": "agentWallet",
      "endpoint": "eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7"
    }
  ],
  "registrations": [
    {
      "agentId": 22,
      "agentRegistry": "eip155:1:{identityRegistry}"
    }
  ],
  "supportedTrust": [
    "reputation",
    "crypto-economic",
    "tee-attestation"
  ]
}

Agents can use this file to publish their description, image, and connection details.

type, name, description, and image are the basic fields used for compatibility with ERC-721 applications. Under endpoints, an agent can list communication and identification mechanisms such as A2A, MCP, ENS, DID, and a wallet. The version field is recommended but optional.

An agent needs at least one registry entry in its registration file. If supportedTrust is empty or absent, the agent uses ERC-8004 for discovery only.

On-chain metadata extensions

The registry extends ERC-721 with methods for storing metadata on-chain.

getMetadata
javascript
function getMetadata(uint256 agentId, string key)

Looks up on-chain metadata by agent ID and key.

Arguments

  • agentId
    • ID of the agent to look up.
  • key
    • Metadata key.
setMetadata
javascript
function setMetadata(uint256 agentId, string key, bytes value)

Adds or updates agent metadata and emits a MetadataSet event.

Arguments

  • agentId
    • ID of the target agent.
  • key
    • Metadata key to set.
  • value
    • Value to store.
MetadataSet
javascript
event MetadataSet(uint256 indexed agentId, string indexed indexedKey, string key, bytes value)

Emitted when the agent's metadata is set or updated.

Parameters

  • agentId
    • ID of the target agent.
  • indexedKey
    • Indexed copy of the metadata key.
  • key
    • Metadata key that was set.
  • value
    • Metadata value that was set.

Agent registration methods

The registry defines methods for registering or minting a new agent.

MetadataEntry
javascript
struct MetadataEntry {
  string key;
  bytes value;
}

Represents a single metadata entry to attach to the agent during registration.

Parameters

  • key
    • Metadata key.
  • value
    • Metadata value.
register
javascript
function register(string tokenURI, MetadataEntry[] calldata metadata) returns (uint256 agentId)

Registers and mints an agent using a registration file URI and initial metadata. Registration emits Transfer and MetadataSet events.

Arguments

  • tokenURI
    • URI of the agent's registration file.
  • metadata
    • Array of metadata entries.

Return value

  • agentId
    • ID of the newly registered agent.
register
javascript
function register(string tokenURI) returns (uint256 agentId)

Registers an agent with only a URI and no initial on-chain metadata. The registry can update the registration file URI later through its internal _setTokenURI() mechanism, while on-chain metadata can be set separately.

Arguments

  • tokenURI
    • URI of the agent's registration file.

Return value

  • agentId
    • ID of the registered agent.
register
javascript
function register() returns (uint256 agentId)

Registers an agent without specifying a URI. The registry can set the URI later through its internal _setTokenURI() mechanism.

Return value

  • agentId
    • ID of the registered agent.
Registered
javascript
event Registered(uint256 indexed agentId, string tokenURI, address indexed owner)

Emitted on successful registration to record the owner and URI.

Parameters

  • agentId
    • ID of the newly registered agent.
  • tokenURI
    • Registration file URI.
  • owner
    • Agent owner's address.

Implementation Notes

ERC-8004 ties agent protocols such as MCP and A2A to Web3 identifiers and accounts, including wallet addresses, DIDs, and ENS names, through a registration file discoverable from the blockchain. An extensible endpoint list lets the file accommodate new protocols as they appear.

Area Goal Mechanism Background
Agent protocol integration Show where an agent is available and how to contact it. The Identity Registry's tokenURI points to a file listing MCP, A2A, ENS, DID, and wallet endpoints. MCP exposes AI tools and prompts. A2A handles authentication, messages, and task management. ENS provides human-readable names, while DIDs are decentralized identifiers.
Feedback design Reuse A2A and MCP concepts such as tasks, skills, tools, and prompts while keeping feedback signals flexible. Combine scores (0–100), tags, and external JSON, preferably on IPFS, for on-chain aggregation and more advanced off-chain analysis. Tags can capture the use case or domain. External JSON can record what happened, the outcome, and payment evidence.
Gas sponsorship Let clients submit feedback with less friction and without registering beforehand. An application could use EIP-7702 to cover fees when needed. Gas sponsorship lets users take actions without supplying gas fees themselves.
Indexing Ingest public feedback to improve the user experience. Keep scores and similar signals on-chain and detailed data on IPFS, so a subgraph in The Graph ecosystem can index the records efficiently. A subgraph indexes blockchain data so applications can query it.
Deployment strategy Deploy one instance per chain. An agent registered and rated on chain A can operate and transact on other chains. It can register on multiple chains if needed. A singleton deployment designates a single canonical registry per chain.

For background on EIP-7702, see the following article.

[EIP7702] How EOAs can use smart contract code

Test Cases

The protocol supports applications such as these.

Use case Example Implementation detail
Agent crawling Start at a central discovery point and find agents' names, images, services, endpoints (MCP, A2A, and others), ENS names, wallets, and supported trust models such as reputation, validation, and TEE attestations. Follow each Identity Registry agentId to its registration file and read endpoints and supportedTrust.
Agent explorer or marketplace Browse, transfer, and manage agents in an ERC-721-compatible application. Reuse existing NFT infrastructure because agents are represented as ERC-721 tokens.
Reputation systems Compute metrics such as average scores in smart contracts or run more advanced off-chain analysis. Publish the results as reusable signals. Combine on-chain scores and tags with detailed JSON on IPFS for aggregation and visualization.
Discovering agents with validation support Check whether agents support stake-secured re-execution, zkML, or TEE verification, then send a validation request through a standard interface. Use the Validation Registry's requests and responses to track verification availability and scores (0–100).

Security

ERC-8004 provides public signals for evaluation and validation. Implementers still need to account for the limits of those signals.

Issue What the proposal provides Limit Practical approach
Feedback pre-authorization Pre-authorization can reduce some spam in versions of the proposal that include it. Sybil attacks, in which one party uses many fake accounts to inflate reputation, remain possible. Model reviewer or client reliability independently and filter feedback based on the reviewer.
Audit trail integrity Values recorded in on-chain history, such as pointers and hashes, can be audited after the fact. Incorrect records also remain in the history. Verify before recording, use role-based approvals, and append corrective responses to document changes.
Validator incentives The verification protocol defines any slashing and rewards. The registry itself does not control those incentives. Specify staking, reward allocation, and penalties for misconduct in the verification protocol.
Authenticity of advertised capabilities On-chain references associate the registration file with the agent. ERC-8004 cannot by itself guarantee that an advertised capability works or that an agent is acting in good faith. Combine reputation, validation, and TEE attestation to choose an assurance level appropriate to the risk.
  • A Sybil attack occurs when one party creates numerous false identities to manipulate votes or reputation.
  • A TEE (Trusted Execution Environment) is a tamper-resistant execution environment that can provide hardware-backed attestation about a computation.
  • zkML (zero-knowledge machine learning) cryptographically proves the correctness of machine-learning inference without revealing the inputs or the model itself.

References

Marco De Rossi (@MarcoMetaMask), Davide Crapis (@dcrapis) davide@ethereum.org, Jordan Ellis jordanellis@google.com, Erik Reppel erik.reppel@coinbase.com, "ERC-8004: Trustless Agents [DRAFT]," Ethereum Improvement Proposals, no. 8004, August 2025. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-8004.

Conclusion

ERC-8004 proposes a way to discover agents and establish trust through reputation and validation without having to know the agent beforehand.

If you have questions, feel free to send me a direct message on Twitter.

Twitter @cardene777

I also publish on these sites.

https://chaldene.net/