{"eip":8004,"title":"Trustless Agents","description":"Discover agents and establish trust through reputation and validation","authors":["Marco De Rossi (@MarcoMetaMask)","Davide Crapis (@dcrapis) \u003cdavide@ethereum.org\u003e","Jordan Ellis \u003cjordanellis@google.com\u003e","Erik Reppel \u003cerik.reppel@coinbase.com\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2025-08-13","requires":[155,712,721,1271],"discussionsTo":"https://ethereum-magicians.org/t/erc-8004-trustless-agents/25098","repo":"ERCs","label":"ERC-8004","officialUrl":"https://eips.ethereum.org/EIPS/eip-8004","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8004.md","url":"https://eips.huatuo.xyz/eip-8004/","tldr":{"en":"Three on-chain registries (identity, reputation, validation) that let AI agents be discovered and trusted across organisations without prior relationships.","ja":"AI エージェントが、事前の関係がなくても組織をまたいで発見され、信頼されるようにする 3 つのオンチェーンレジストリ（アイデンティティ、レピュテーション、バリデーション）。","ko":"AI 에이전트가 사전 관계 없이도 조직을 넘나들며 발견되고 신뢰받을 수 있게 하는 세 가지 온체인 레지스트리(신원, 평판, 검증).","zh":"三个链上注册表（身份、声誉、验证），让 AI 智能体无需事先建立关系，就能跨组织被发现和被信任。"},"tags":["ai-agents","identity","reputation","registry","nft"],"explainers":{"en":{"lang":"en","tldr":"Three on-chain registries (identity, reputation, validation) that let AI agents be discovered and trusted across organisations without prior relationships.","tags":["ai-agents","identity","reputation","registry","nft"],"related":[721,712,1271,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8004/","markdown":"## What problem does it solve?\n\nAgent 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.\n\n## How it works\n\n**Identity Registry.** An [ERC-721](/eip-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](/eip-712/) or [ERC-1271](/eip-1271/)) and is cleared when the agent NFT is transferred.\n\n**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.\n\n**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.\n\n## Sample code\n\nMinimal registration file served at the `agentURI`:\n\n```json\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"PriceBot\",\n  \"description\": \"Returns token prices. Pay per call.\",\n  \"image\": \"https://example.com/pricebot.png\",\n  \"services\": [\n    { \"name\": \"MCP\", \"endpoint\": \"https://mcp.example.com/\", \"version\": \"2025-06-18\" },\n    { \"name\": \"A2A\", \"endpoint\": \"https://example.com/.well-known/agent-card.json\", \"version\": \"0.3.0\" }\n  ],\n  \"active\": true,\n  \"registrations\": [\n    { \"agentId\": 22, \"agentRegistry\": \"eip155:1:\u003cidentityRegistryAddress\u003e\" }\n  ],\n  \"supportedTrust\": [\"reputation\"]\n}\n```\n\nLeaving feedback (ethers v6):\n\n```ts\nimport { Contract, ZeroHash } from \"ethers\";\n\nconst reputation = new Contract(reputationRegistry, [\n  \"function giveFeedback(uint256,int128,uint8,string,string,string,string,bytes32)\",\n], signer);\nawait reputation.giveFeedback(22n, 87n, 0, \"starred\", \"\", \"\", \"\", ZeroHash); // 87/100\n```\n\n## Things to know\n\n- **Status: Draft.** Function signatures and the file format are still changing, and the spec contains open editor notes.\n- Reputation is public but not Sybil-proof. Decide which reviewers you trust, and do not rely on raw averages.\n- 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.\n- Payments, validator incentives and slashing are out of scope. Gas-free feedback can be built with [EIP-7702](/eip-7702/) sponsorship.\n- Domain control of an endpoint can optionally be shown via `/.well-known/agent-registration.json`.\n"},"ja":{"lang":"ja","tldr":"AI エージェントが、事前の関係がなくても組織をまたいで発見され、信頼されるようにする 3 つのオンチェーンレジストリ（アイデンティティ、レピュテーション、バリデーション）。","tags":["ai-agents","identity","reputation","registry","nft"],"related":[721,712,1271,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8004/","markdown":"## 何を解決するのか\n\nMCP や Agent2Agent（A2A）のようなエージェントプロトコルは、ソフトウェアエージェントがツールをどう公開し、互いにどう通信するかを記述しますが、まだ取引のないエージェントをどう*見つけるか*や、それを信頼すべきかどうかをどう判断するかは扱いません。ERC-8004 は、チェーンごとにシングルトンとしてデプロイできる軽量なレジストリを提案し、すべてのエージェントに持ち運び可能なアイデンティティと、フィードバックや独立した検証についての公開・共有の記録を与えます。\n\n## 仕組み\n\n**Identity Registry。** 各トークンが 1 つのエージェントを表す [ERC-721](/eip-721/) コントラクトです。`agentId` はトークン ID で、`agentURI`（トークン URI）は JSON の**登録ファイル**を指します。登録ファイルには、名前、説明、画像、`services` の一覧（A2A カード、MCP エンドポイント、ENS 名、DID、Web、メールなど）、およびサポートする信頼モデルが含まれます。エージェントは `register(...)` で登録され、`setAgentURI` で更新され、追加のキー・バリュー形式のメタデータを持たせることもできます。予約済みの `agentWallet` キー（エージェントが支払いを受け取る先）は、新しいウォレットからの署名（[EIP-712](/eip-712/) または [ERC-1271](/eip-1271/)）がなければ変更できず、エージェントの NFT が移転されるとクリアされます。\n\n**Reputation Registry。** エージェントのオーナーまたはオペレーターを除く任意のクライアントが、`giveFeedback(agentId, value, valueDecimals, tag1, tag2, endpoint, feedbackURI, feedbackHash)` を呼び出せます。`value` は符号付きの固定小数点数で、タグが意味を与えます（`starred`、`uptime`、`responseTime` など）。クライアントはフィードバックを取り消すことができ、誰でも返信を追加できます。`getSummary` はスコアを集計しますが、フィルタ対象のクライアントアドレスのリストを必要とします。フィルタなしの合計は、シビル攻撃に対してあまりに無防備だからです。\n\n**Validation Registry。** エージェントのオーナーは `validationRequest(validator, agentId, requestURI, requestHash)` で検証を依頼します。指名されたバリデーター（ステークで担保された再実行、zkML 検証者、TEE オラクルなど）が `validationResponse(requestHash, response, …)` で回答します。`response` は 0〜100 で、後から更新することもできます。\n\n## サンプルコード\n\n`agentURI` で配信される最小限の登録ファイル:\n\n```json\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"PriceBot\",\n  \"description\": \"Returns token prices. Pay per call.\",\n  \"image\": \"https://example.com/pricebot.png\",\n  \"services\": [\n    { \"name\": \"MCP\", \"endpoint\": \"https://mcp.example.com/\", \"version\": \"2025-06-18\" },\n    { \"name\": \"A2A\", \"endpoint\": \"https://example.com/.well-known/agent-card.json\", \"version\": \"0.3.0\" }\n  ],\n  \"active\": true,\n  \"registrations\": [\n    { \"agentId\": 22, \"agentRegistry\": \"eip155:1:\u003cidentityRegistryAddress\u003e\" }\n  ],\n  \"supportedTrust\": [\"reputation\"]\n}\n```\n\nフィードバックを残す（ethers v6）:\n\n```ts\nimport { Contract, ZeroHash } from \"ethers\";\n\nconst reputation = new Contract(reputationRegistry, [\n  \"function giveFeedback(uint256,int128,uint8,string,string,string,string,bytes32)\",\n], signer);\nawait reputation.giveFeedback(22n, 87n, 0, \"starred\", \"\", \"\", \"\", ZeroHash); // 87/100\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** 関数シグネチャとファイル形式はまだ変更中で、仕様にはエディターのメモが未解決のまま残っています。\n- レピュテーションは公開されていますが、シビル耐性はありません。どのレビュアーを信頼するかを決め、単純な平均値に頼らないでください。\n- 登録が証明するのは、そのファイルがオンチェーンのエージェントに属しているということだけです。エージェントが動作すること、安全であることは証明しません。それがレピュテーションとバリデーションの役割です。\n- 支払い、バリデーターのインセンティブ、スラッシングはスコープ外です。ガス不要のフィードバックは [EIP-7702](/eip-7702/) のスポンサーシップで構築できます。\n- エンドポイントのドメイン管理は、任意で `/.well-known/agent-registration.json` によって示せます。\n"},"ko":{"lang":"ko","tldr":"AI 에이전트가 사전 관계 없이도 조직을 넘나들며 발견되고 신뢰받을 수 있게 하는 세 가지 온체인 레지스트리(신원, 평판, 검증).","tags":["ai-agents","identity","reputation","registry","nft"],"related":[721,712,1271,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8004/","markdown":"## 어떤 문제를 해결하나요?\n\nMCP, Agent2Agent(A2A) 같은 에이전트 프로토콜은 소프트웨어 에이전트가 도구를 어떻게 노출하고 서로 어떻게 통신하는지는 설명하지만, 거래해 본 적 없는 에이전트를 어떻게 *찾는지*, 또 그것을 신뢰할지 어떻게 판단하는지는 다루지 않습니다. ERC-8004는 체인마다 싱글톤으로 배포할 수 있는 가벼운 레지스트리를 제안하여, 모든 에이전트에게 이동 가능한 신원과 피드백 및 독립 검증에 대한 공개적이고 공유되는 기록을 제공합니다.\n\n## 어떻게 동작하나요?\n\n**Identity Registry.** 각 토큰이 하나의 에이전트인 [ERC-721](/eip-721/) 컨트랙트입니다. `agentId`는 토큰 ID이고, `agentURI`(토큰 URI)는 JSON **등록 파일**을 가리킵니다. 등록 파일에는 이름, 설명, 이미지, `services` 목록(A2A 카드, MCP 엔드포인트, ENS 이름, DID, 웹, 이메일 등), 지원하는 신뢰 모델이 담깁니다. 에이전트는 `register(...)`로 등록하고 `setAgentURI`로 갱신하며, 추가 키/값 메타데이터를 가질 수도 있습니다. 예약된 `agentWallet` 키(에이전트가 대금을 받는 곳)는 새 지갑의 서명([EIP-712](/eip-712/) 또는 [ERC-1271](/eip-1271/))이 있어야만 변경할 수 있으며, 에이전트 NFT가 이전되면 초기화됩니다.\n\n**Reputation Registry.** 에이전트의 소유자나 운영자를 제외한 모든 클라이언트가 `giveFeedback(agentId, value, valueDecimals, tag1, tag2, endpoint, feedbackURI, feedbackHash)`를 호출할 수 있습니다. `value`는 부호 있는 고정소수점 수이고, 태그가 그 의미를 부여합니다(`starred`, `uptime`, `responseTime` 등). 클라이언트는 피드백을 철회할 수 있고, 누구나 응답을 덧붙일 수 있습니다. `getSummary`는 점수를 집계하지만 필터링할 클라이언트 주소 목록이 필요합니다. 필터링하지 않은 합계는 시빌 공격에 너무 쉽게 당하기 때문입니다.\n\n**Validation Registry.** 에이전트의 소유자는 `validationRequest(validator, agentId, requestURI, requestHash)`로 검증을 요청합니다. 지정된 검증자(스테이크로 보증되는 재실행, zkML 검증기, TEE 오라클 등)가 `validationResponse(requestHash, response, …)`로 응답하며, `response`는 0~100이고 나중에 갱신할 수도 있습니다.\n\n## 샘플 코드\n\n`agentURI`에서 제공되는 최소 등록 파일:\n\n```json\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"PriceBot\",\n  \"description\": \"Returns token prices. Pay per call.\",\n  \"image\": \"https://example.com/pricebot.png\",\n  \"services\": [\n    { \"name\": \"MCP\", \"endpoint\": \"https://mcp.example.com/\", \"version\": \"2025-06-18\" },\n    { \"name\": \"A2A\", \"endpoint\": \"https://example.com/.well-known/agent-card.json\", \"version\": \"0.3.0\" }\n  ],\n  \"active\": true,\n  \"registrations\": [\n    { \"agentId\": 22, \"agentRegistry\": \"eip155:1:\u003cidentityRegistryAddress\u003e\" }\n  ],\n  \"supportedTrust\": [\"reputation\"]\n}\n```\n\n피드백 남기기(ethers v6):\n\n```ts\nimport { Contract, ZeroHash } from \"ethers\";\n\nconst reputation = new Contract(reputationRegistry, [\n  \"function giveFeedback(uint256,int128,uint8,string,string,string,string,bytes32)\",\n], signer);\nawait reputation.giveFeedback(22n, 87n, 0, \"starred\", \"\", \"\", \"\", ZeroHash); // 87/100\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 함수 시그니처와 파일 형식은 아직 바뀌고 있으며, 명세에는 해결되지 않은 편집자 메모가 남아 있습니다.\n- 평판은 공개되어 있지만 시빌 공격에 안전하지 않습니다. 어떤 리뷰어를 신뢰할지 정하고, 단순 평균에 의존하지 마세요.\n- 등록은 해당 파일이 온체인 에이전트에 속한다는 것만 증명합니다. 에이전트가 제대로 동작하거나 안전하다는 것은 증명하지 않습니다. 그것이 평판과 검증의 역할입니다.\n- 결제, 검증자 인센티브, 슬래싱은 범위 밖입니다. 가스 없는 피드백은 [EIP-7702](/eip-7702/) 스폰서십으로 구축할 수 있습니다.\n- 엔드포인트의 도메인 통제권은 선택적으로 `/.well-known/agent-registration.json`을 통해 보여줄 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"三个链上注册表（身份、声誉、验证），让 AI 智能体无需事先建立关系，就能跨组织被发现和被信任。","tags":["ai-agents","identity","reputation","registry","nft"],"related":[721,712,1271,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8004/","markdown":"## 它解决什么问题？\n\nMCP 和 Agent2Agent（A2A）等智能体协议描述了软件智能体如何暴露工具并相互通信，但没有说明如何*找到*一个从未打过交道的智能体，或如何决定是否信任它。ERC-8004 提出轻量级注册表，可以在每条链上部署为单例，为每个智能体提供可移植的身份，以及关于反馈和独立验证的公开共享记录。\n\n## 它如何运作\n\n**身份注册表（Identity Registry）。** 一个 [ERC-721](/eip-721/) 合约，每个代币就是一个智能体。`agentId` 是代币 ID，`agentURI`（代币 URI）指向一个 JSON **注册文件**，其中包含名称、描述、图片、`services` 列表（A2A 卡片、MCP 端点、ENS 名称、DID、网页、邮箱……）以及它支持的信任模型。智能体通过 `register(...)` 注册，通过 `setAgentURI` 更新，还可以携带额外的键值元数据。保留键 `agentWallet`（智能体收款的地址）只有在新钱包签名（[EIP-712](/eip-712/) 或 [ERC-1271](/eip-1271/)）后才能更改，并且在智能体 NFT 转移时会被清除。\n\n**声誉注册表（Reputation Registry）。** 除智能体所有者或操作者之外的任何客户端都可以调用 `giveFeedback(agentId, value, valueDecimals, tag1, tag2, endpoint, feedbackURI, feedbackHash)`。`value` 是带符号的定点数，标签赋予它含义（`starred`、`uptime`、`responseTime`……）。客户端可以撤销反馈，任何人都可以追加回应。`getSummary` 会汇总评分，但需要传入一个客户端地址列表作为过滤条件，因为未过滤的总数很容易遭受女巫攻击。\n\n**验证注册表（Validation Registry）。** 智能体所有者通过 `validationRequest(validator, agentId, requestURI, requestHash)` 请求验证。被指定的验证者（质押担保的重新执行、zkML 验证器、TEE 预言机……）用 `validationResponse(requestHash, response, …)` 作答，其中 `response` 为 0–100，之后还可以更新。\n\n## 示例代码\n\n在 `agentURI` 处提供的最小注册文件：\n\n```json\n{\n  \"type\": \"https://eips.ethereum.org/EIPS/eip-8004#registration-v1\",\n  \"name\": \"PriceBot\",\n  \"description\": \"Returns token prices. Pay per call.\",\n  \"image\": \"https://example.com/pricebot.png\",\n  \"services\": [\n    { \"name\": \"MCP\", \"endpoint\": \"https://mcp.example.com/\", \"version\": \"2025-06-18\" },\n    { \"name\": \"A2A\", \"endpoint\": \"https://example.com/.well-known/agent-card.json\", \"version\": \"0.3.0\" }\n  ],\n  \"active\": true,\n  \"registrations\": [\n    { \"agentId\": 22, \"agentRegistry\": \"eip155:1:\u003cidentityRegistryAddress\u003e\" }\n  ],\n  \"supportedTrust\": [\"reputation\"]\n}\n```\n\n留下反馈（ethers v6）：\n\n```ts\nimport { Contract, ZeroHash } from \"ethers\";\n\nconst reputation = new Contract(reputationRegistry, [\n  \"function giveFeedback(uint256,int128,uint8,string,string,string,string,bytes32)\",\n], signer);\nawait reputation.giveFeedback(22n, 87n, 0, \"starred\", \"\", \"\", \"\", ZeroHash); // 87/100\n```\n\n## 需要注意\n\n- **状态：Draft。** 函数签名和文件格式仍在变化，规范中还有未解决的编辑备注。\n- 声誉是公开的，但无法抵御女巫攻击。请决定你信任哪些评价者，不要依赖原始平均值。\n- 注册只能证明该文件属于链上的智能体，并不能证明智能体可用或安全。这正是声誉和验证的用途。\n- 支付、验证者激励和惩罚（slashing）不在范围内。免 gas 的反馈可以借助 [EIP-7702](/eip-7702/) 的代付来实现。\n- 端点的域名控制权可以选择通过 `/.well-known/agent-registration.json` 来证明。\n"}},"requiredBy":[8041,8126,8217,8354]}
