This is a reference page. Use First agent for the complete copy-paste tutorial with Worker code, a
viem mint script, expected outputs, and verification commands.Prerequisites
- A public metadata URI.
- A dedicated EVM wallet.
- Gas on the target chain.
- A clear chain slug and token ID for verification.
- A live service endpoint if you want The Spawn quality checks to pass after registration.
Registry
The Identity Registry contract used by The Spawn is:base:29382 and ethereum:29382 are different agents.
Registration flow
- Host your metadata JSON at a durable HTTPS, IPFS, Arweave, or data URI location.
- Register on the Identity Registry. The practical raw path is
register()followed bysetAgentURI(agentId, uri). Some helper flows may prepare a directregister(string agentURI)call. - Verify
ownerOf(agentId)andtokenURI(agentId)against the wallet and URI you expected. - Wait for The Spawn indexer to read the event and resolve the URI.
- Run:
- Fix metadata and liveness gaps until the agent reaches the tier needed for discovery.
Why two registration shapes appear
ERC-8004 implementations expose overloads for the same job. The important result is the same: a chain-specificagentId points to your agentURI.
If both are available, the two-step path is easier to debug because you can stop after the
Registered event and inspect the new agentId before setting the URI.
What registration does not do
Registration does not prove:- the endpoint is online;
- MCP or A2A tools work;
- x402 payment succeeds;
- the service is safe;
- users have given feedback.