The identity infrastructure for the agentic web. Built on World AgentKit — every AI agent cryptographically bound to a verified human. x402 payments. AgentBook registration. Zero-knowledge proof.
AgentKit extends x402 — adding a cryptographic proof layer that ties every agent request to a unique verified human identity on WorldChain.
Production-ready stack: Hono + x402 + AgentKit. Accepts payments on both WorldChain and Solana. AgentBook lookup pinned to Worldchain.
import { Hono } from 'hono' import { serve } from '@hono/node-server' import { HTTPFacilitatorClient } from '@x402/core/http' import { ExactEvmScheme } from '@x402/evm/exact/server' import { paymentMiddlewareFromHTTPServer, x402HTTPResourceServer, x402ResourceServer, } from '@x402/hono' import { agentkitResourceServerExtension, createAgentBookVerifier, createAgentkitHooks, declareAgentkitExtension, InMemoryAgentKitStorage, } from '@worldcoin/agentkit' // Chain + token config const WORLD_CHAIN = 'eip155:480' const SOLANA = 'solana:mainnet' const WORLD_USDC = 'coming_soon' const payTo = '0xYourPaymentAddress' // x402 facilitator const facilitatorClient = new HTTPFacilitatorClient({ url: 'https://x402-worldchain.vercel.app/facilitator', }) // EVM scheme with USDC parser for WorldChain const evmScheme = new ExactEvmScheme() .registerMoneyParser(async (amount, network) => { if (network !== WORLD_CHAIN) return null return { amount: String(Math.round(amount * 1e6)), asset: WORLD_USDC, extra: { name: 'USD Coin', version: '2' }, } }) // AgentBook verifier (Worldchain) const agentBook = createAgentBookVerifier({ network: 'world' }) const storage = new InMemoryAgentKitStorage() // Hooks — free-trial: 3 requests before payment const hooks = createAgentkitHooks({ agentBook, storage, mode: { type: 'free-trial', uses: 3 }, }) const resourceServer = new x402ResourceServer(facilitatorClient) .register(WORLD_CHAIN, evmScheme) .registerExtension(agentkitResourceServerExtension) // Route config — dual chain payments const routes = { 'GET /data': { accepts: [ { scheme: 'exact', price: '$0.01', network: WORLD_CHAIN, payTo }, { scheme: 'exact', price: '$0.01', network: SOLANA, payTo }, ], extensions: declareAgentkitExtension({ statement: 'Verify your agent is backed by a real human', mode: { type: 'free-trial', uses: 3 }, }), }, } const httpServer = new x402HTTPResourceServer(resourceServer, routes) .onProtectedRequest(hooks.requestHook) const app = new Hono() app.use(paymentMiddlewareFromHTTPServer(httpServer)) app.get('/data', c => { return c.json({ message: 'Protected content' }) }) serve({ fetch: app.fetch, port: 4021 })
npm install @worldcoin/agentkit @x402/hono
npx @worldcoin/agentkit-cli register <agent-address>
createAgentkitHooks to your x402 server. Configure free-trial mode (3 uses) or discount mode for returning humans.createAgentkitHooks({ agentBook, storage, mode })
InMemoryAgentKitStorage with a database implementation that persists usage counters and nonces across restarts.class DatabaseAgentKitStorage implements AgentKitStorage
interface AgentKitStorage { getUsageCount(endpoint: string, humanId: string): Promise<number> incrementUsage(endpoint: string, humanId: string): Promise<void> hasUsedNonce(nonce: string): Promise<boolean> recordNonce(nonce: string): Promise<void> }
Register agents, simulate the AgentKit verification flow, and run protected requests against the x402 middleware stack.
Agent payments run on Solana. Identity anchored to Worldchain via World AgentKit.