Give your AI agent a wallet. It pays for APIs automatically.
Ag402
<strong>Give your AI agent a wallet. It pays for APIs automatically.</strong>
Ag402 is the payment layer for the Coinbase x402 protocol. It makes AI agents pay for API calls automatically — on Solana, in USDC, with zero code changes.
Agent calls API → 402 Payment Required → Ag402 auto-pays USDC on Solana → 200 OK
Non-custodial. Zero telemetry. Already in production.
Why Ag402
Zero friction
- Zero code changes for buyers, sellers, and MCP developers
- One command to start paying:
ag402 run -- python my_agent.py - One command to start selling:
ag402 serve --target ... --price ... --address ... - One command to install MCP tools:
ag402 install claude-code - No config files, no API keys, no accounts, no signup
- Colab one-click demo — try it in your browser, zero install
Open standard
- Implements Coinbase x402 — the emerging HTTP payment standard
- MIT licensed, fully open source, extensible protocol layer (
open402) with zero dependencies - AI-native docs — ships with `llms.txt` so LLM agents can read the full CLI reference natively
Battle-tested
- Token RugCheck — live on Solana mainnet with real USDC payments
- 775+ tests, 90%+ coverage, 4 rounds of internal security review (24/24 issues fixed)
- Multi-endpoint RPC failover + circuit breaker + async delivery retry
Blazing fast
- ~0.5s standard payment (
confirmedfinality, not 13sfinalized) - ~1ms prepaid payment (local HMAC, no on-chain call)
- Zero overhead on non-402 requests — no body read, no allocation
- Connection pooling, lazy imports, SQLite WAL mode
Security-first
- 6-layer budget protection — per-tx / per-minute / daily / circuit breaker / rollback / key redaction
- Non-custodial — private keys never leave your machine
- Seller-No-Key — sellers only need a public address, zero private key risk
- Zero telemetry — no tracking, no IP logging, no analytics
- Wallet encryption: PBKDF2 (480K iter) + AES
- CI: CodeQL + Trivy + pip-audit + Semgrep + OpenSSF Scorecard
Universal compatibility
- Claude Code, Cursor, Claude Desktop — MCP auto-config
- OpenClaw — native Skill (SKILL.md + TOOLS.md + skill.py), not just MCP
- LangChain, AutoGen, CrewAI, Semantic Kernel — works automatically
- Any Python agent using
httpxorrequests— zero changes - TypeScript/Node.js agents —
@ag402/fetchnpm package, zero dependencies
Zero Code Changes. For Everyone.
| You are... | What you do | Code changes |
|---|---|---|
| Agent user (LangChain, CrewAI, AutoGen, any Python agent) | pip install ag402-core && ag402 run -- python my_agent.py |
Zero — your agent code is untouched |
| TypeScript/Node.js agent developer | npm install @ag402/fetch — wrap fetch() w |
Configuration
{ "mcpServers": { "ag402": { "command": "ag402", "args": ["mcp"] } } }