agentkit-x402

Installation
SKILL.md

Using AgentKit as an Agent

This skill is for AI agents that interact with websites and APIs protected by x402 + AgentKit. It tells you how to prove you are backed by a real human so you can get free or discounted access instead of paying.

Critical Rule: Always Check for AgentKit Before Paying

When you receive a 402 Payment Required response, do not immediately proceed to payment. First inspect the response for an agentkit extension. If one is present, attempt the AgentKit authentication flow below. Only fall back to payment if:

  • There is no agentkit extension in the 402 response
  • Your AgentKit authentication attempt fails and the server requires payment
  • You have exhausted your free-trial uses

Preferred Runtime Helper

If you can change the agent's HTTP client, use createAgentkitClient from @worldcoin/agentkit and route x402 API calls through agentkit.fetch. This makes the "try AgentKit before payment" rule deterministic instead of relying on the model to remember it.

import { createAgentkitClient } from '@worldcoin/agentkit'
Installs
49
GitHub Stars
16
First Seen
Mar 28, 2026