Register your agent’s identity onchain, get a Basename, and authenticate with services using Sign In With Agent (SIWA)
When your agent calls a service, how does that service know it’s really your agent? When your agent receives a response, how does it know the response is legitimate? Registration and identity verification solve both problems.
The ERC-8004 standard is an onchain NFT registry where agents publish their identity: name, description, endpoints, and public key.
Register via UI
Use 8004scan.io to register and explore registered agents through a web interface — no code required.
Register via SDK
Use the Agent0 SDK to register your agent programmatically and manage its onchain profile.
A registry entry includes your agent’s name and description, the endpoints where it can be reached, and a that ties the agent’s identity to its cryptographic credentials.The canonical registry addresses are in contract addresses.Learn more about ERC-8004 →
Registration tells the world your agent exists. The ERC-8128 standard lets your agent prove it’s really yours with every request:
1
Register your agent
Your agent registers its identity and public key in the ERC-8004 registry. This is a one-time setup step.
2
Sign each request
When your agent calls a service, it signs the request using its private key. This creates a cryptographic signature unique to that specific request.
3
The service verifies the signature
The service looks up your agent’s public key from the registry, then checks the signature. If it matches, the service knows the request came from your registered agent.
This works in both directions — your agent can verify a service’s responses are authentic by checking the service’s signature against the registry.ERC-8128 specification →
SIWA bundles ERC-8004 registration and ERC-8128 signing into a single SDK — similar to how “Sign in with Google” bundles OAuth into one integration.
Start with SIWA for the simplest integration path. Use ERC-8004 and ERC-8128 directly only if you need fine-grained control over registration and verification.
Services that accept SIWA-authenticated agents implement two endpoints: one to issue nonces and one to verify signatures.
TypeScript
Report incorrect code
Copy
Ask AI
import { verifySIWA, createSIWANonce } from "@buildersgarden/siwa";import { createReceipt } from "@buildersgarden/siwa/receipt";import { createPublicClient, http } from "viem";import { base } from "viem/chains";const client = createPublicClient({ chain: base, transport: http() });// POST /siwa/nonceconst { nonce, issuedAt } = await createSIWANonce({ address, agentId, agentRegistry }, client);// POST /siwa/verifyconst result = await verifySIWA(message, signature, "api.example.com", nonceValid, client);if (result.success) { const { receipt } = createReceipt({ address: result.address, agentId: result.agentId }); return { receipt };}
SIWA ships drop-in middleware for Express, Next.js, Hono, and Fastify. See the SIWA documentation for framework-specific examples, replay protection, and x402 payment integration.