- Agent-side x402 calls use
agentkit.fetchfromcreateAgentkitClient - Accepts payments on both World Chain and Base
- Agent registration on World Chain
- AgentBook lookup always resolves on World Chain (caller side is chain-agnostic)
free-trialmode with 3 uses- Hono plus
@x402/honoas the reference server example
Step 1: Install AgentKit
Step 2: Register the agent in AgentBook
Register the wallet address your agent will sign with:- Looks up the next nonce for the agent address
- Prompts the World App verification flow
- Submits the registration transaction
Example of the registration flow
Step 3: Wrap x402 calls in the agent
Use this in agents that call paid x402 APIs. Without this client, agents may go straight to payment instead of using their AgentKit registration.agentkit.fetch anywhere the agent would otherwise call fetch for x402-protected APIs. It tries AgentKit first, then leaves the normal x402 payment fallback in place.
If you cannot change the agent’s HTTP client, add the fallback skill:
Step 4: Wire the hooks-based server flow
The example below shows the maintained Hono wrapper path. AgentKit itself is not Hono-only: Express and Next.js route handlers can use the same hooks and low-level helpers from the SDK Reference.Step 5: Configure the default mode and storage
This guide usesfree-trial mode so registered human-backed agents get 3 free requests before the normal x402 payment flow resumes. InMemoryAgentKitStorage is fine for local testing, but production should persist both usage counters and nonces.
discount mode, custom AgentBook deployments, or the low-level validation helpers? Continue to the SDK Reference.