Use this skill for end-to-end server-side integration work with @worldcoin/agentkit.
Start by clarifying the integration
If the developer has not already answered these, ask before choosing an implementation:
Which access mode do they want: free, free-trial, or discount?
Which payment network should the protected route use?
Do they control the facilitator path, or are they using a hosted facilitator?
Do they also need agent registration, or only request-time verification?
Default recommendation
For most production integrations:
Put paid routes on whichever network the developer's facilitator already supports (commonly World Chain eip155:480 or Base eip155:8453).
Leave AgentBook lookup alone — createAgentBookVerifier() always resolves against the canonical World Chain deployment. The developer does not need to think about which chain the registry lives on.
Start with free-trial unless the developer explicitly wants free or discount.
Only choose discount when you can wire hooks.verifyFailureHook into the facilitator flow you control.
Key pieces
x402 resource server: the protected HTTP route and 402 challenge flow
facilitator: verifies and settles payment payloads; required for discount
AgentKit extension: adds the CAIP-122 challenge and verifies the signed agentkit header
AgentBook: on-chain registry on World Chain that maps the agent wallet to an anonymous human ID. Lookup is always against World Chain regardless of the payment chain — the caller side is chain-agnostic.
storage: per-human usage tracking for free-trial and discount
registration path: separate from request-time verification; use npx @worldcoin/agentkit-cli --llms if the developer also needs registration help
Workflow
Read ../../x402/DOCS.md first. It should be the primary integration playbook.
If the payment network is World Chain (eip155:480), add a custom ExactEvmScheme().registerMoneyParser(...) for World Chain USDC. Do not assume the server scheme has a working default stablecoin for World Chain.
Call createAgentBookVerifier() with no arguments in the common case. Pass rpcUrl or contractAddress only for custom World Chain endpoints or non-canonical deployments.
If the mode is free-trial or discount, add persistent AgentKitStorage. InMemoryAgentKitStorage is only for demos.
If the mode is discount, wire hooks.verifyFailureHook into the facilitator. Without it, discounted underpayments will fail verification.
Verify the whole path end-to-end:
402 response includes the agentkit extension
registered agent gets the intended behavior
unregistered agent falls back to normal payment
replay protection and storage behavior work as expected
Ground rules
Prefer the hooks-based integration unless the user explicitly needs the low-level flow.
Use ../../x402/DOCS.md as the primary reference for examples and mode behavior.
Do not introduce any "pin AgentBook to chain X" language — lookup is always against the canonical World Chain deployment. The payment chain and the AgentBook lookup chain are decoupled on purpose, and callers should never have to think about the lookup chain.
Do not document World Chain with bare new ExactEvmScheme() only. Include the World Chain money parser.
Do not choose discount unless the facilitator hook can actually be registered.
1---2name: integrate-agentkit3description: Integrate AgentKit4---56# Integrate AgentKit78Use this skill for end-to-end server-side integration work with `@worldcoin/agentkit`.910## Start by clarifying the integration1112If the developer has not already answered these, ask before choosing an implementation:13141. Which access mode do they want: `free`, `free-trial`, or `discount`?152. Which payment network should the protected route use?163. Do they control the facilitator path, or are they using a hosted facilitator?174. Do they also need agent registration, or only request-time verification?1819## Default recommendation2021For most production integrations:2223- Put paid routes on whichever network the developer's facilitator already supports (commonly World Chain `eip155:480` or Base `eip155:8453`).24- Leave AgentBook lookup alone — `createAgentBookVerifier()` always resolves against the canonical World Chain deployment. The developer does not need to think about which chain the registry lives on.25- Start with `free-trial` unless the developer explicitly wants `free` or `discount`.26- Only choose `discount` when you can wire `hooks.verifyFailureHook` into the facilitator flow you control.2728## Key pieces2930- x402 resource server: the protected HTTP route and 402 challenge flow31- facilitator: verifies and settles payment payloads; required for `discount`32- AgentKit extension: adds the CAIP-122 challenge and verifies the signed `agentkit` header33- AgentBook: on-chain registry on World Chain that maps the agent wallet to an anonymous human ID. Lookup is always against World Chain regardless of the payment chain — the caller side is chain-agnostic.34- storage: per-human usage tracking for `free-trial` and `discount`35- registration path: separate from request-time verification; use `npx @worldcoin/agentkit-cli --llms` if the developer also needs registration help3637## Workflow38391. Read [`../../x402/DOCS.md`](../../x402/DOCS.md) first. It should be the primary integration playbook.402. Confirm exported APIs in [`../../core/src/index.ts`](../../core/src/index.ts) and [`../../x402/src/index.ts`](../../x402/src/index.ts) before adding imports.413. Prefer the hooks-based path:42 - `declareAgentkitExtension`43 - `agentkitResourceServerExtension`44 - `createAgentkitHooks`45 - `createAgentBookVerifier`464. If the payment network is World Chain (`eip155:480`), add a custom `ExactEvmScheme().registerMoneyParser(...)` for World Chain USDC. Do not assume the server scheme has a working default stablecoin for World Chain.475. Call `createAgentBookVerifier()` with no arguments in the common case. Pass `rpcUrl` or `contractAddress` only for custom World Chain endpoints or non-canonical deployments.486. If the mode is `free-trial` or `discount`, add persistent `AgentKitStorage`. `InMemoryAgentKitStorage` is only for demos.497. If the mode is `discount`, wire `hooks.verifyFailureHook` into the facilitator. Without it, discounted underpayments will fail verification.508. Verify the whole path end-to-end:51 - 402 response includes the `agentkit` extension52 - registered agent gets the intended behavior53 - unregistered agent falls back to normal payment54 - replay protection and storage behavior work as expected5556## Ground rules5758- Prefer the hooks-based integration unless the user explicitly needs the low-level flow.59- Use [`../../x402/DOCS.md`](../../x402/DOCS.md) as the primary reference for examples and mode behavior.60- Do not introduce any "pin AgentBook to chain X" language — lookup is always against the canonical World Chain deployment. The payment chain and the AgentBook lookup chain are decoupled on purpose, and callers should never have to think about the lookup chain.61- Do not document World Chain with bare `new ExactEvmScheme()` only. Include the World Chain money parser.62- Do not choose `discount` unless the facilitator hook can actually be registered.63- Confirm exports in [`../../core/src/index.ts`](../../core/src/index.ts) and [`../../x402/src/index.ts`](../../x402/src/index.ts) before adding or documenting imports.6465## Constants to keep handy6667- World Chain payment network: `eip155:480`68- World Chain AgentBook contract: `0xA23aB2712eA7BBa896930544C7d6636a96b944dA`69- World Chain USDC: `0x79A02482A880bCE3F13e09Da970dC34db4CD24d1`7071## Reference files7273- Integration docs: [`../../x402/DOCS.md`](../../x402/DOCS.md)74- Core public exports: [`../../core/src/index.ts`](../../core/src/index.ts)75- x402 public exports: [`../../x402/src/index.ts`](../../x402/src/index.ts)76- Hooks: [`../../x402/src/hooks.ts`](../../x402/src/hooks.ts)77- AgentBook verifier: [`../../core/src/agent-book.ts`](../../core/src/agent-book.ts)78- Header parsing and verification: [`../../core/src/parse.ts`](../../core/src/parse.ts), [`../../core/src/validate.ts`](../../core/src/validate.ts), [`../../core/src/verify.ts`](../../core/src/verify.ts)
Run npx skillmds@latest add worldcoin/integrate-agentkit in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Integrate AgentKit It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
worldcoin (@worldcoin) published this skill. Their other Agent Skills are listed on their SkillMD profile.