Registry contracts curated by the 8004 team
See the codeImplementation of the ERC-8004 protocol for agent discovery and trust through reputation and validation.
0x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B7388713More chains coming soon...
This repository implements ERC-8004 (Trustless Agents): a lightweight set of on-chain registries that make agents discoverable and enable trust signals across organizational boundaries.
At a high level, ERC-8004 defines three registries:
The normative spec lives in ERC8004SPEC.md.
Install dependencies:
npm install
Run tests:
npm test
Or via Hardhat:
npx hardhat test
An agent is identified by:
{namespace}:{chainId}:{identityRegistry} (e.g., eip155:11155111:0x...)tokenId minted by the Identity RegistryOff-chain payloads (registration files, feedback files, evidence) should include both fields so they can be tied back to the on-chain agent.
tokenURI points to a registration file.The Identity Registry is an upgradeable ERC-721 (ERC721URIStorage) where:
tokenURI) points to the agent registration file (e.g., ipfs://... or https://...).agentId.The registry also provides optional on-chain metadata:
getMetadata(agentId, metadataKey) -> bytessetMetadata(agentId, metadataKey, metadataValue)The reserved key agentWallet is managed specially:
setAgentWallet(...) (EIP-712 / ERC-1271).getAgentWallet(agentId) and unsetAgentWallet(agentId).The agentURI should resolve to a JSON document that is friendly to NFT tooling (name/description/image) and also advertises agent endpoints. The spec's registration file includes:
type: schema identifier for the registration formatname, description, imageservices: a list of endpoints (e.g., A2A agent card URL, MCP endpoint, OASF manifest, ENS name, email)registrations: a list of { agentRegistry, agentId } references to bind the file back to on-chain identitysupportedTrust: optional list such as reputation, crypto-economic, tee-attestationIf an agent advertises an HTTPS endpoint, it can optionally prove domain control by hosting a well-known file (see ERC8004SPEC.md). Verifiers can use it to confirm that an endpoint domain is controlled by the same agent identity.
The Reputation Registry stores and exposes feedback signals as a signed fixed-point number:
value: int128 (signed)valueDecimals: uint8 (0–18)Everything else is optional metadata (tags, endpoint URI, off-chain payload URI + hash).
value + valueDecimalsTreat the pair as a signed decimal number:
value=9977, valueDecimals=2 → 99.77value=560, valueDecimals=0 → 560This allows a single on-chain schema to represent percentages, scores, timings, dollar amounts, etc. (the meaning is conveyed by tag1/tag2 and/or the off-chain file).
giveFeedback(...) records feedback for an agent. The implementation prevents self-feedback from the agent owner or approved operators (checked via the Identity Registry).
Typical read paths:
readFeedback(agentId, clientAddress, feedbackIndex)readAllFeedback(agentId, clientAddresses, tag1, tag2, includeRevoked)getSummary(agentId, clientAddresses, tag1, tag2) → returns (count, summaryValue, summaryValueDecimals)Note: getSummary requires clientAddresses to be provided (non-empty) to reduce Sybil/spam risk.
revokeFeedback(agentId, feedbackIndex)appendResponse(agentId, clientAddress, feedbackIndex, responseURI, responseHash)register(...)) and get an agentId.agentURI via setAgentURI(agentId, ...).setAgentWallet(...) (EIP-712/1271 proof).giveFeedback(...) on the Reputation Registry.getSummary(...) and/or pull raw feedback via readAllFeedback(...) for off-chain scoring.Warning
The Validation Registry portion of the ERC-8004 spec is still under active update and discussion with the TEE community. This section will be revised and expanded in a follow-up spec update later this year.
The current implementation supports:
validationRequest(validatorAddress, agentId, requestURI, requestHash) (must be called by owner/operator of agentId)validationResponse(requestHash, response, responseURI, responseHash, tag) (must be called by the requested validator)getValidationStatus, getSummary, getAgentValidations, getValidatorRequestsThe agent's agentURI should resolve to a registration file (see ERC8004SPEC.md) containing human-friendly metadata plus a list of advertised services/endpoints (e.g., A2A, MCP, OASF, ENS, email).
The on-chain feedback can optionally reference a richer off-chain JSON payload (again see the spec) that includes:
agentRegistry, agentId, clientAddress, createdAtvalue, valueDecimalsmcp, a2a, and oasfTip: keep the on-chain call minimal (tags + numeric signal), and put verbose context (task transcript, payment proof, artifacts, model/version info) in the off-chain JSON referenced by feedbackURI.
contracts/
├── IdentityRegistryUpgradeable.sol - ERC-721 based agent registration (upgradeable)
├── ReputationRegistryUpgradeable.sol - Feedback + aggregation (upgradeable)
└── ValidationRegistryUpgradeable.sol - Validation request/response (upgradeable)
abis/ - Contract ABIs for integrations
ignition/modules/ - Deployment modules
scripts/ - Deployment/upgrade utilities
test/ - Test suite
ERC8004SPEC.md - Protocol spec used as source-of-truth for docs
CC0 - Public Domain
ERC-8004 is a community effort coordinated by Marco De Rossi (MetaMask) and Davide Crapis (EF), with the co-authorship of Jordan Ellis (Google) and Erik Reppel (Coinbase). Our core team is joined by Leonard Tan (MetaMask), Vitto Rivabella (EF), and Isha Sangani (EF).
Check out our website at 8004.org and reach out at team@8004.org.
TypeScript
88.3%
Solidity
11.7%
Registry contracts curated by the 8004 team
See the codeImplementation of the ERC-8004 protocol for agent discovery and trust through reputation and validation.
0x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b630x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B73887130x8004A818BFB912233c491871b3d84c89A494BD9e0x8004B663056A597Dffe9eCcC1965A193B7388713More chains coming soon...
This repository implements ERC-8004 (Trustless Agents): a lightweight set of on-chain registries that make agents discoverable and enable trust signals across organizational boundaries.
At a high level, ERC-8004 defines three registries:
The normative spec lives in ERC8004SPEC.md.
Install dependencies:
npm install
Run tests:
npm test
Or via Hardhat:
npx hardhat test
An agent is identified by:
{namespace}:{chainId}:{identityRegistry} (e.g., eip155:11155111:0x...)tokenId minted by the Identity RegistryOff-chain payloads (registration files, feedback files, evidence) should include both fields so they can be tied back to the on-chain agent.
tokenURI points to a registration file.The Identity Registry is an upgradeable ERC-721 (ERC721URIStorage) where:
tokenURI) points to the agent registration file (e.g., ipfs://... or https://...).agentId.The registry also provides optional on-chain metadata:
getMetadata(agentId, metadataKey) -> bytessetMetadata(agentId, metadataKey, metadataValue)The reserved key agentWallet is managed specially:
setAgentWallet(...) (EIP-712 / ERC-1271).getAgentWallet(agentId) and unsetAgentWallet(agentId).The agentURI should resolve to a JSON document that is friendly to NFT tooling (name/description/image) and also advertises agent endpoints. The spec's registration file includes:
type: schema identifier for the registration formatname, description, imageservices: a list of endpoints (e.g., A2A agent card URL, MCP endpoint, OASF manifest, ENS name, email)registrations: a list of { agentRegistry, agentId } references to bind the file back to on-chain identitysupportedTrust: optional list such as reputation, crypto-economic, tee-attestationIf an agent advertises an HTTPS endpoint, it can optionally prove domain control by hosting a well-known file (see ERC8004SPEC.md). Verifiers can use it to confirm that an endpoint domain is controlled by the same agent identity.
The Reputation Registry stores and exposes feedback signals as a signed fixed-point number:
value: int128 (signed)valueDecimals: uint8 (0–18)Everything else is optional metadata (tags, endpoint URI, off-chain payload URI + hash).
value + valueDecimalsTreat the pair as a signed decimal number:
value=9977, valueDecimals=2 → 99.77value=560, valueDecimals=0 → 560This allows a single on-chain schema to represent percentages, scores, timings, dollar amounts, etc. (the meaning is conveyed by tag1/tag2 and/or the off-chain file).
giveFeedback(...) records feedback for an agent. The implementation prevents self-feedback from the agent owner or approved operators (checked via the Identity Registry).
Typical read paths:
readFeedback(agentId, clientAddress, feedbackIndex)readAllFeedback(agentId, clientAddresses, tag1, tag2, includeRevoked)getSummary(agentId, clientAddresses, tag1, tag2) → returns (count, summaryValue, summaryValueDecimals)Note: getSummary requires clientAddresses to be provided (non-empty) to reduce Sybil/spam risk.
revokeFeedback(agentId, feedbackIndex)appendResponse(agentId, clientAddress, feedbackIndex, responseURI, responseHash)register(...)) and get an agentId.agentURI via setAgentURI(agentId, ...).setAgentWallet(...) (EIP-712/1271 proof).giveFeedback(...) on the Reputation Registry.getSummary(...) and/or pull raw feedback via readAllFeedback(...) for off-chain scoring.Warning
The Validation Registry portion of the ERC-8004 spec is still under active update and discussion with the TEE community. This section will be revised and expanded in a follow-up spec update later this year.
The current implementation supports:
validationRequest(validatorAddress, agentId, requestURI, requestHash) (must be called by owner/operator of agentId)validationResponse(requestHash, response, responseURI, responseHash, tag) (must be called by the requested validator)getValidationStatus, getSummary, getAgentValidations, getValidatorRequestsThe agent's agentURI should resolve to a registration file (see ERC8004SPEC.md) containing human-friendly metadata plus a list of advertised services/endpoints (e.g., A2A, MCP, OASF, ENS, email).
The on-chain feedback can optionally reference a richer off-chain JSON payload (again see the spec) that includes:
agentRegistry, agentId, clientAddress, createdAtvalue, valueDecimalsmcp, a2a, and oasfTip: keep the on-chain call minimal (tags + numeric signal), and put verbose context (task transcript, payment proof, artifacts, model/version info) in the off-chain JSON referenced by feedbackURI.
contracts/
├── IdentityRegistryUpgradeable.sol - ERC-721 based agent registration (upgradeable)
├── ReputationRegistryUpgradeable.sol - Feedback + aggregation (upgradeable)
└── ValidationRegistryUpgradeable.sol - Validation request/response (upgradeable)
abis/ - Contract ABIs for integrations
ignition/modules/ - Deployment modules
scripts/ - Deployment/upgrade utilities
test/ - Test suite
ERC8004SPEC.md - Protocol spec used as source-of-truth for docs
CC0 - Public Domain
ERC-8004 is a community effort coordinated by Marco De Rossi (MetaMask) and Davide Crapis (EF), with the co-authorship of Jordan Ellis (Google) and Erik Reppel (Coinbase). Our core team is joined by Leonard Tan (MetaMask), Vitto Rivabella (EF), and Isha Sangani (EF).
Check out our website at 8004.org and reach out at team@8004.org.
TypeScript
88.3%
Solidity
11.7%