# AgentPay — agent access & authentication

There is **no OAuth, no API key, and no signup form**. AgentPay authenticates
agents the x402 way: by payment.

## Free tier (17 tools, $0)

1. Register (optional but recommended — mints an identity + session token):

       POST https://agentpay.tools/v1/agent/register

2. Call any free tool. You'll receive a `402` challenge; retry with the
   `free:<payment_id>` proof exactly as the challenge instructs. No wallet,
   no funds required.

## Paid tools ($0.01: session_create, pre_trade_check, verified_route)

Pay the `402` challenge with USDC on **Base** (EIP-3009, gasless) or
**Stellar**. The easiest client is the SDK:

    pip install "agentpay-x402[base]"

    from agentpay import quickstart
    s = quickstart(max_spend=0.10)          # hard budget cap
    r = s.call("token_price", {"symbol": "ETH"})

Every paid call returns a verifiable on-chain receipt (see `/ledger`).

## MCP

    npx @romudille/agentpay-mcp             # keyless, Node >= 18

## Machine-readable surfaces

- OpenAPI: https://agentpay.tools/openapi.json
- API catalog (RFC 9727): https://agentpay.tools/.well-known/api-catalog
- Manifest: https://agentpay.tools/.well-known/agentpay.json
- A2A card: https://agentpay.tools/.well-known/agent.json
- LLM guide: https://agentpay.tools/llms.txt
