GOAT Network
AgentKit

ERC-8004 for AgentKit

Use the AgentKit erc8004 plugin when you want your agent to be discoverable, attach structured metadata, and accumulate reputation signals on GOAT Network.

What This Gives You

CapabilityWhy it matters for agents
On-chain identityLets clients and indexers discover a stable agent record
Metadata URIPublishes machine-readable registration JSON over IPFS or HTTPS
Agent walletSeparates the receiving wallet from the owner wallet when needed
Reputation registryStores client feedback and summary trust signals
Cross-protocol compositionLets you pair identity with x402 payments

Network-Aware Contract Resolution

AgentKit now resolves ERC-8004 contract addresses from ctx.network at runtime.

NetworkIdentity RegistryReputation RegistryNotes
goat-mainnet0x8004A169FB4a3325136EB29fA0ceB6D2e539a4320x8004BAa17C55a88189AE136b182e5fdA19dE9b63Canonical CREATE2-style mainnet deployment
goat-testnet0x556089008Fc0a60cD09390Eca93477ca254A55220xd9140951d8aE6E5F625a02F5908535e16e3af964Testnet3 runtime mapping used by the latest AgentKit release

Registry Identifier

The canonical agentRegistry identifier is:

Registry identifier format
eip155:{chainId}:{identityRegistryAddress}

Examples:

Registry identifiers by network
eip155:2345:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
eip155:48816:0x556089008Fc0a60cD09390Eca93477ca254A5522

AgentKit Action Map

ActionPurpose
erc8004.register_agentRegister an agent and create the base on-chain identity
erc8004.set_agent_uriPoint the registry entry at your registration JSON
erc8004.get_metadataRead metadata fields already stored for an agent
erc8004.set_metadataWrite additional on-chain metadata fields
erc8004.get_agent_walletRead the payout wallet for an agent
erc8004.give_feedbackSubmit a client feedback record
erc8004.revoke_feedbackRevoke a feedback record you previously submitted
erc8004.get_reputationQuery summary reputation signals
erc8004.get_clientsList clients that have interacted with the agent

Registration JSON Schema

Your agentURI should resolve to a JSON document with these top-level fields:

FieldRequiredNotes
typeYesUse the ERC-8004 registration schema URL
nameYesHuman-readable agent name
descriptionYesShort capability summary
imageNoLogo or preview image
servicesYesEndpoint list for A2A, MCP, x402, or other exposed interfaces
x402SupportNoSet to true only if the agent actually exposes paid endpoints
activeYesWhether the agent should be considered live
registrationsYesInclude the GOAT Network registry identifier and agentId
supportedTrustNoReputation, TEE attestation, or other trust modes

Minimal Example

registration.json
{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "GoatAgent",
  "description": "Autonomous service agent on GOAT Network",
  "image": "https://example.com/agent.png",
  "services": [
    {
      "name": "MCP",
      "endpoint": "https://agent.example/mcp",
      "version": "2025-06-18"
    },
    {
      "name": "x402",
      "endpoint": "https://agent.example/api/orders",
      "version": "1.0.0"
    }
  ],
  "x402Support": true,
  "active": true,
  "registrations": [
    {
      "agentRegistry": "eip155:2345:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
      "agentId": 1
    }
  ],
  "supportedTrust": ["reputation"]
}

If you are registering on goat-testnet, replace the registry identifier with eip155:48816:0x556089008Fc0a60cD09390Eca93477ca254A5522.

Register the Plugin in AgentKit

src/erc8004.ts
import { ActionProvider } from '@goatnetwork/agentkit/providers';
import {
  erc8004RegisterAgentAction,
  erc8004SetAgentURIAction,
  erc8004GetMetadataAction,
  erc8004SetMetadataAction,
  erc8004GetAgentWalletAction,
  erc8004GiveFeedbackAction,
  erc8004RevokeFeedbackAction,
  erc8004GetReputationAction,
  erc8004GetClientsAction,
} from '@goatnetwork/agentkit/plugins';

const provider = new ActionProvider();

provider.register(erc8004RegisterAgentAction(wallet));
provider.register(erc8004SetAgentURIAction(wallet));
provider.register(erc8004GetMetadataAction(wallet));
provider.register(erc8004SetMetadataAction(wallet));
provider.register(erc8004GetAgentWalletAction(wallet));
provider.register(erc8004GiveFeedbackAction(wallet));
provider.register(erc8004RevokeFeedbackAction(wallet));
provider.register(erc8004GetReputationAction(wallet));
provider.register(erc8004GetClientsAction(wallet));

Registration Flow

Register the agent

Use erc8004.register_agent to create the initial Identity Registry entry.

Publish your registration JSON

Store a machine-readable registration.json file on IPFS or HTTPS. This document should describe the agent, its services, and its trust model.

Attach the metadata URI

Use erc8004.set_agent_uri so indexers and clients can resolve your off-chain metadata.

Set optional metadata and payout wallet

Use erc8004.set_metadata for extra fields and update the receiving wallet when payments should not go to the owner wallet.

Start collecting feedback

Encourage integrators or clients to submit feedback through the Reputation Registry so your agent accumulates usable trust signals.

Reputation Flow

Identity + reputation flow
Agent owner
  -> register_agent
  -> set_agent_uri
  -> set_metadata
Clients
  -> give_feedback
  -> revoke_feedback (if needed)
Indexers / callers
  -> get_reputation
  -> get_clients

How x402 Fits In

ERC-8004 is not a payment layer. Pair it with x402 Payments when you want:

NeedUse
Agent discoveryERC-8004
Paid HTTP endpointsx402
Machine-readable service entryAdd an x402 service object in registration.json
Separate payout walletagentWallet plus your x402 settlement setup

Operational Checklist

  • Pin registration.json to durable storage such as IPFS when possible.
  • Keep services accurate so callers can find MCP, A2A, and x402 endpoints without guessing.
  • Use x402Support: true only when you actually expose paid routes.
  • Prefer a dedicated payout wallet if the owner wallet should not receive production payments.
  • Re-check the explorer after registration or wallet updates to confirm the state change landed.
  • Match the registry address to the execution network because AgentKit now resolves goat-mainnet and goat-testnet to different ERC-8004 contracts.

On this page