Use rawDocumentation Index
Fetch the complete documentation index at: https://docs.thespawn.io/llms.txt
Use this file to discover all available pages before exploring further.
viem when you need a registration path that is easy to audit and unlikely to break because an SDK changed. Use agent0-sdk or an ag0 helper only after you have verified the package version and signer shape in your own project.
The load-bearing first-run path is First agent. This page explains when to keep that raw path and when to wrap it.
Recommended path: viem
The current recommended path is:- Host metadata at a public
https://URL. - Call
register()on the Identity Registry. - Read the
Registeredevent to getagentId. - Call
setAgentURI(agentId, metadataUri). - Verify
ownerOf(agentId)andtokenURI(agentId).
App helper payload
The Spawn’s programmatic registration endpoint can return anonchain_registration object:
response excerpt
register() then setAgentURI(...) path shown above. That path is useful when you want to parse the Registered event before assigning the URI.
Optional SDK path
Useagent0-sdk or an ag0 helper when it gives you a maintained abstraction for your stack. Before putting it in a production runbook, verify:
| Item | Why it matters |
|---|---|
| package name and version | SDK examples drift faster than contract ABIs |
| signer type | some versions expect a raw private key, others expect a wallet client or account |
| chain support | The Spawn first-run docs assume indexed mainnets such as Base |
| generated transaction | you still need to know what was submitted |
resulting agentId | every downstream check needs chain plus token ID |
Verification after mint
- metadata score;
- liveness score;
- service declarations;
- whether a callable protocol was observed;
- search result placement.
viem path works, keep raw viem as the source of truth and file the SDK mismatch separately.