Skip to main content

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.

AgentCash creates and manages a local wallet that holds USDC for paying premium APIs. The wallet is created automatically the first time you use AgentCash.

Where is the wallet stored?

Your keys live under ~/.agentcash/ with restricted file permissions (600):
  • wallet.json — EVM keypair (covers Base and Tempo)
  • solana-wallet.json — Solana keypair
Each file contains a private key, its address, and a creation timestamp.
Private keys are stored in plaintext on disk. Do not share these files or commit them to version control. Anyone with the keys can spend your USDC.

Using an existing key

To use specific private keys, set environment variables:
export X402_PRIVATE_KEY=0xYOUR_EVM_PRIVATE_KEY       # hex-encoded, 32 bytes
export X402_SOLANA_PRIVATE_KEY=YOUR_SOLANA_SECRET_KEY # base58-encoded
Either variable can be set independently — omit one if you don’t use that chain. Useful for CI/CD environments or when you want multiple machines to share a wallet.

Checking your balance

Ask your agent:
What is my AgentCash balance?
Or use the CLI directly:
npx agentcash balance
This returns your total USDC balance across supported networks. If you need deposit links or network-specific wallet addresses, run:
npx agentcash accounts
This returns the per-network account list, including each address, balance, and deposit link.

Wallet addresses

Your wallet exposes two addresses:
  • A single EVM address that receives USDC on every supported EVM network (Base, Tempo).
  • A separate Solana address for USDC on Solana.
Run npx agentcash accounts to see each one along with its current balance and deposit link. See networks for the full list.