EIPs Explained

ERC-8004 · Draft · ERC · 2025-08-13

ERC-8004: Trustless Agents

Three on-chain registries (identity, reputation, validation) that let AI agents be discovered and trusted across organisations without prior relationships.

What problem does it solve?

Agent protocols such as MCP and Agent2Agent (A2A) describe how software agents expose tools and talk to each other, but not how you find an agent you have never dealt with, or decide whether to trust it. ERC-8004 proposes lightweight registries, deployable as one singleton per chain, that give every agent a portable identity and a public, shared record of feedback and independent verification.

How it works

Identity Registry. An ERC-721 contract where each token is an agent. agentId is the token ID and agentURI (the token URI) points to a JSON registration file with a name, description, image, a list of services (A2A card, MCP endpoint, ENS name, DID, web, email…) and the trust models it supports. Agents are registered with register(...), updated with setAgentURI, and can carry extra key/value metadata. The reserved agentWallet key (where the agent is paid) can only be changed with a signature from the new wallet (EIP-712 or ERC-1271) and is cleared when the agent NFT is transferred.

Reputation Registry. Any client except the agent's owner or operators can call giveFeedback(agentId, value, valueDecimals, tag1, tag2, endpoint, feedbackURI, feedbackHash). value is a signed fixed-point number, and tags give it meaning (starred, uptime, responseTime…). Clients can revoke feedback, and anyone can append a response. getSummary aggregates scores but requires a list of client addresses to filter by, because unfiltered totals are trivially Sybil-attacked.

Validation Registry. The agent's owner requests verification with validationRequest(validator, agentId, requestURI, requestHash). The named validator (stake-secured re-execution, zkML verifier, TEE oracle…) answers with validationResponse(requestHash, response, …), where response is 0–100, and may update it later.

Sample code

Minimal registration file served at the agentURI:

{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "PriceBot",
  "description": "Returns token prices. Pay per call.",
  "image": "https://example.com/pricebot.png",
  "services": [
    { "name": "MCP", "endpoint": "https://mcp.example.com/", "version": "2025-06-18" },
    { "name": "A2A", "endpoint": "https://example.com/.well-known/agent-card.json", "version": "0.3.0" }
  ],
  "active": true,
  "registrations": [
    { "agentId": 22, "agentRegistry": "eip155:1:<identityRegistryAddress>" }
  ],
  "supportedTrust": ["reputation"]
}

Leaving feedback (ethers v6):

import { Contract, ZeroHash } from "ethers";

const reputation = new Contract(reputationRegistry, [
  "function giveFeedback(uint256,int128,uint8,string,string,string,string,bytes32)",
], signer);
await reputation.giveFeedback(22n, 87n, 0, "starred", "", "", "", ZeroHash); // 87/100

Things to know

  • Status: Draft. Function signatures and the file format are still changing, and the spec contains open editor notes.
  • Reputation is public but not Sybil-proof. Decide which reviewers you trust, and do not rely on raw averages.
  • Registration proves the file belongs to the on-chain agent. It does not prove the agent works or is safe. That is what reputation and validation are for.
  • Payments, validator incentives and slashing are out of scope. Gas-free feedback can be built with EIP-7702 sponsorship.
  • Domain control of an endpoint can optionally be shown via /.well-known/agent-registration.json.

#ai-agents #identity #reputation #registry #nft

Details

Authors
Marco De Rossi (@MarcoMetaMask), Davide Crapis (@dcrapis) <[email protected]>, Jordan Ellis <[email protected]>, Erik Reppel <[email protected]>
Status
Draft
Type
Standards Track / ERC
Created
2025-08-13
Requires
Required by

Machine-readable: Markdown · JSON