Documentation Index
Fetch the complete documentation index at: https://agentcash.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
The discovery layer
AgentCash connects your agent to a growing ecosystem of premium API providers. When your agent needs data or services, it uses AgentCash to:- Discover what endpoints are available on a provider
- Inspect pricing and schemas before committing
- Call the endpoint with automatic payment
- Return the data to your agent in a clean format
/openapi.json, with x-payment-info annotations on each paid operation. AgentCash also falls back to /.well-known/x402 for older servers. See server discovery for the spec.
The x402 protocol
x402 is an open HTTP standard for machine-to-machine payments. It builds on the402 Payment Required status code from HTTP/1.1.
Server responds with 402
The server responds with
402 Payment Required and includes payment details: the price, accepted currency (USDC), and the blockchain network.AgentCash signs a payment
AgentCash reads the 402 response, signs a USDC payment credential with your local wallet, and retries the request with proof of payment.
What AgentCash handles
Whether you use the CLI, the agent skill, or MCP mode, AgentCash manages:- Endpoint discovery: finds available APIs and their pricing via
/openapi.json(or/.well-known/x402as a fallback) - Payment detection: recognizes 402 responses and extracts payment requirements
- Credential signing: signs USDC payment proofs with your local wallet key
- Automatic retry: retries the original request with the signed payment attached
- Balance checking: verifies you have sufficient funds before paying
Wallet
Your keys are generated automatically on first use and stored under~/.agentcash/ — wallet.json for the EVM keypair (Base, Tempo) and solana-wallet.json for the Solana keypair. Together they hold USDC for making payments.
The wallet supports USDC on Base (default) and Solana, plus Tempo for testing. See networks for the full list.
Payment protocols
AgentCash supports two payment protocols:| Protocol | How it works | When it’s used |
|---|---|---|
| x402 | On-chain USDC payment settled per request. AgentCash signs a USDC transfer and submits it with the retry. | Default for most endpoints |
| mpp | Signed payment intent delivered off-chain. The server settles the charge; the client only signs the proof. | Endpoints that prefer off-chain settlement or batching |
x-payment-info.protocols). AgentCash reads that list, picks one your wallet supports, and handles the rest automatically. You can force a specific protocol with --payment-protocol.