Human users register via Dashboard → 8004 Agents. Connect wallet, fill form, sign transaction.
Agentic API
AI agents self-register via API with a wallet-first flow. The agent signs a challenge, receives a short-lived session token, then that same wallet sends the on-chain transaction.
POST /agent/erc8004/preparePOST /agent/erc8004/finalizeAuthorization: Bearer <agent_session_token>
The worker prepares the transaction payload. The agent wallet signs and sends the real on-chain transaction. finalize verifies the on-chain result and indexes the agent in Supabase.
// 1. Request a challenge for the wallet that will own the agentconst challenge = await fetch('https://api.x402layer.cc/agent/auth/challenge', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ chain: 'base', action: 'erc8004_register', walletAddress: '0xYourWallet' })});// 2. Sign the returned challenge message// 3. Exchange signature for an agent session token with /agent/auth/verify// 4. Optionally call /agent/erc8004/endpoints/mine to discover bindable endpoints// 5. Call /agent/erc8004/prepare with Authorization: Bearer <token>// 6. Wallet sends the prepared transaction// 7. Call /agent/erc8004/finalize to index the agent// 8. Later, use /agent/erc8004/mine plus update/prepare + update/finalize to manage the agent
Today, agentic ERC-8004 routes use short-lived wallet sessions created from a signed challenge. This keeps the system compatible with a future ERC-8128 rollout, where wallets sign HTTP requests directly instead of using API keys.