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
/.well-known/x402, making them instantly findable.
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
/.well-known/x402 - 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 wallet is a locally-stored Ethereum keypair at~/.agentcash/wallet.json, created automatically on first use. It holds USDC for making payments.
The wallet supports USDC on multiple EVM networks, with Base as the default. See networks for the full list.
Payment protocols
AgentCash supports the following payment protocols:| Protocol | How it works | When it’s used |
|---|---|---|
| x402 | On-chain USDC payments verified by the server | Default for most endpoints |