ERC-8004 for Agents
ERC-8004 defines a trust layer for agent ecosystems using three registries:
- Identity Registry for agent discovery and ownership
- Reputation Registry for feedback and scoring signals
- Validation Registry for third-party verification workflows
This page focuses on how GOAT Network builders should integrate the standard.
If you are integrating ERC-8004 through AgentKit, start with the AgentKit ERC-8004 guide. This builder page remains the protocol-level reference.
Contract Deployments on GOAT Network
The canonical erc-8004-contracts repository uses deterministic deployment. GOAT Network is included in the official mainnet deployment set:
| Contract | Address | Version |
|---|---|---|
| IdentityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 | 2.0.0 |
| ReputationRegistry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 | 2.0.0 |
If you are integrating through the latest AgentKit runtime on goat-testnet (testnet3), the network-specific registry mapping is:
| Network | Identity Registry | Reputation Registry |
|---|---|---|
goat-testnet | 0x556089008Fc0a60cD09390Eca93477ca254A5522 | 0xd9140951d8aE6E5F625a02F5908535e16e3af964 |
These testnet3 addresses come from the latest AgentKit network-aware ERC-8004 resolution logic. Mainnet remains the canonical protocol reference in this page.
Builder Flow
1) Construct the registry identifier for GOAT Network
Use the Identity Registry address and GOAT Network chain ID to construct the agentRegistry identifier:
eip155:{chainId}:{identityRegistryAddress}
On GOAT Network mainnet (chain ID 2345):
eip155:2345:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
On GOAT Network testnet3 (chain ID 48816):
eip155:48816:0x556089008Fc0a60cD09390Eca93477ca254A5522
2) Register the agent in Identity Registry
The canonical implementation supports three registration entry points:
register()register(agentURI)register(agentURI, metadata)
Example using ethers.js on GOAT Network mainnet:
Useful follow-up methods include:
setAgentURI(agentId, newURI)getMetadata(agentId, metadataKey)setMetadata(agentId, metadataKey, metadataValue)—metadataValueisbytesgetAgentWallet(agentId)setAgentWallet(agentId, newWallet, deadline, signature)unsetAgentWallet(agentId)isAuthorizedOrOwner(spender, agentId)
agentURI should resolve to a registration JSON document, typically over IPFS or HTTPS.
agentWallet is a reserved payment-receiving field in the spec. It defaults to the owner wallet on registration and should be changed with setAgentWallet(...), not by writing generic metadata.
3) Publish a registration JSON that matches the spec
The agentURI set during registration points to an off-chain JSON document (hosted on IPFS or HTTPS). This is not stored on-chain — only the URI is recorded in the contract. The following top-level fields are expected in this document per the ERC-8004 spec:
typenamedescriptionimageservices— each entry containsname,endpoint,version, and optionallyskillsanddomainsx402Support— boolean indicating payment capability via x402activeregistrations
supportedTrust is optional.
4) Collect trust signals through Reputation Registry
Write paths:
giveFeedback(agentId, value, valueDecimals, tag1, tag2, endpoint, feedbackURI, feedbackHash)revokeFeedback(agentId, feedbackIndex)appendResponse(agentId, clientAddress, feedbackIndex, responseURI, responseHash)
Read paths:
readFeedback(agentId, clientAddress, feedbackIndex)readAllFeedback(agentId, clientAddresses, tag1, tag2, includeRevoked)getSummary(agentId, clientAddresses, tag1, tag2)getLastIndex(agentId, clientAddress)getResponseCount(agentId, clientAddress, feedbackIndex, responders)getClients(agentId)
For production integrations, keep the on-chain record compact and store richer evidence off-chain behind feedbackURI, with feedbackHash when you need integrity verification.
5) Combine ERC-8004 with payment rails when needed
ERC-8004 is a trust and discovery layer. If your agent also charges for access, combine it with a payment protocol such as x402 rather than treating ERC-8004 itself as the payment layer. See the x402 Payments on GOAT Network guide for integration details.
Registration JSON Example
If you are using ERC-8004 only for discovery, you can omit supportedTrust or leave it empty. Set x402Support to reflect your real payment capabilities rather than treating it as a decorative field. When x402Support is true, include a corresponding x402 service entry in services so that callers can locate the payment endpoint.
Operational Recommendations
- Treat registration as discoverability, not automatic trust.
- Pin the registration JSON and any feedback evidence to stable storage such as IPFS when possible.
- Use
feedbackURI+feedbackHashfor auditable off-chain evidence. - Set a verified agent receiving wallet with
setAgentWallet(...)when payments should not go to the owner address. - Verify on-chain state via the GOAT Network Explorer after registration and wallet updates to confirm transactions landed correctly.
References
- ERC-8004 page (Ethereum EIPs): https://eips.ethereum.org/EIPS/eip-8004
- Canonical ERC markdown: https://raw.githubusercontent.com/ethereum/ERCs/master/ERCS/erc-8004.md
- ERC-8004 contracts repository: https://github.com/erc-8004/erc-8004-contracts
- ERC-8004 contracts README: https://raw.githubusercontent.com/erc-8004/erc-8004-contracts/main/README.md
- ERC-8004 spec file: https://github.com/erc-8004/erc-8004-contracts/blob/main/ERC8004SPEC.md
- ERC-8004 ABIs directory: https://github.com/erc-8004/erc-8004-contracts/tree/main/abis
- GOAT Network IdentityRegistry explorer page: https://explorer.goat.network/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
- GOAT Network ReputationRegistry explorer page: https://explorer.goat.network/address/0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
- GOAT Network x402 repository: https://github.com/GOATNetwork/x402