Repository navigation
agent402 client
Payment wires: every paid endpoint accepts x402 and MPP (Machine Payments Protocol) on the same 402 - see Paying with x402 and Paying with MPP. Agent402 is the applied layer of Agentic Finance: agents that pay and get paid on their own.
agent402-client is the buyer-side SDK for Agent402 and any Agent402 instance: resolve a task to a tool, then call it, with payment handled for you. MIT licensed, no runtime dependencies.
npm install agent402-clientimport { Agent402 } from "agent402-client";
const a = new Agent402(); // https://agent402.tools, or { baseUrl } for your own server
const [best] = await a.find("extract the article from a url");
const out = await a.call("hash", { text: "hello world", algo: "sha256" });- Free tools: the proof-of-work is solved for you on a worker thread; no wallet.
-
Wallet-only tools: pass a payment-aware
fetch(x402 or MPP) and it pays 402s; the SDK never touches your key. -
A credits key: pass
creditsKey, and it is sent asAuthorization: Bearer a402_...; see Credits keys for how a call is debited. - A Circle Gateway deposit: batched payments with no gas per call (Circle Gateway (batched USDC)).
- Spending caps (
maxPerCallUsd,dailyLimitUsd,maxPerHostUsd), a payee allowlist, and a chain preference. - A stable
Idempotency-Keyper operation, so a retried lost response replays the paid answer on the credits and proof-of-work paths. - Paid calls never follow redirects, and
verifyReceiptchecks a signed receipt.
The package README is the full reference. See also Adapters and MCP Connector.
agent402.tools - the applied layer of Agentic Finance: 500+ pay-per-call tools for AI agents over x402 and MPP (Paying with x402 · Paying with MPP · Glossary) · synced from wiki/ in the main repo - edit there, not here.
All other product and company names are trademarks of their respective owners. Naming them describes compatibility or a data source and does not imply affiliation with, or endorsement by, them.
For agents and buyers
- Getting Started
- Agentic Finance
- Why Pay Here
- Reports and Monitors
- Paying with x402
- Paying with MPP
- Solana (USDC)
- Stellar (USDC)
- Algorand (USDC)
- Robinhood Chain (USDG)
- Arc (USDC)
- Ink (USDC)
- Circle Gateway (batched USDC)
- Sessions and Channels
- Credits keys
- Paying with Compute
- Buying at Volume
- Content Pipeline
- MCP Connector
- Adapters
- agent402-client - the buyer SDK
- Amazon Bedrock AgentCore
- Decide - describe a job, get a plan
- Tool Catalog
- Skill Packs
- x402 Index and Router
- Seller Reputation
- x402 Leaderboard
- LLM Gateway (OpenAI /v1)
- LLM Proxy Gateway
- Image Generation Gateway
- Text-to-Speech
- Speech-to-Text
- Text Embeddings
- Payments and x402
- Audit Report - a wallet's signed history
- Memory and Coordination
Tollbooth (for site owners)
- Pay-per-crawl - what it is, install, modes
- Pay-per-crawl Walkthrough - 5-min hands-on
- Tollbooth for Agencies - many-site playbook
Website & Developer
- Reports · Monitors - by card
- Quickstart - first call in 60 seconds
- Playground - try tools in your browser
- SDK REPL - live code editor
- API Explorer - browse OpenAPI
- Adapter Docs - per-framework guides
- Workflows - chaining patterns
- Blog · Changelog
Under the hood
- Architecture
- Security Model
- Operations
- Self-Hosting
- Configuration - every setting
- Tempo (operator setup)
- Card Payments (operator setup)
- Troubleshooting
- Upgrading
- Contributing
- API guide