> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myproceeds.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Circle Agent Stack

> Use Circle CLI and Agent Wallets to pay Proceeds endpoints over x402, including sub-cent nanopayments.

[Circle Agent Stack](https://developers.circle.com/agent-stack) lets your AI agent hold and transact USDC, discover x402 services, and pay per request within built-in compliance guardrails. It pairs naturally with Proceeds: your agent uses a Circle Agent Wallet to pay an x402 paywall, and Circle Gateway settles sub-cent [Circle Nanopayments](/standards/circle-nanopayments) in batches.

Use Circle Agent Stack when you want Circle-native wallets with spending policies, and when your target paywall is priced sub-cent and accepts nanopayments.

## Install

Circle CLI is the unified interface for Agent Wallets, x402 payments, and crosschain transfers. It works alongside agents in Claude Code, Cursor, and Codex.

Install from npm (requires Node.js v20.18.2 or later):

```bash theme={null}
npm install -g @circle-fin/cli
```

Verify the installation:

```bash theme={null}
circle --version
```

## Create and fund an Agent Wallet

Create an Agent Wallet and fund it with USDC. Agent Wallets support email OTP authentication, full onchain capabilities, and customizable policy enforcement.

Follow the [Agent Wallets quickstart](https://developers.circle.com/agent-stack/agent-wallets/quickstart) to create the wallet, then fund it with USDC.

## Deposit into Gateway

<Warning>
  Funding the onchain Agent Wallet is not enough. To pay with Circle Agent Stack you must first **deposit USDC from your onchain wallet into Gateway** — that Gateway balance is what settles payments. The fastest path is depositing from **Base** with the `--method eco` flag (settles on Polygon PoS); direct deposits also work from any Gateway-supported chain.
</Warning>

Deposit once, then pay without gas on each request:

```bash theme={null}
circle gateway deposit --amount 5 --address 0xYourWalletAddress --chain BASE --method eco
```

Confirm the Gateway balance arrived:

```bash theme={null}
circle gateway balance --address 0xYourWalletAddress --chain BASE
```

See [How to: Deposit for Nanopayments](https://developers.circle.com/agent-stack/agent-nanopayments/operations/deposit) for direct vs. eco deposits and full syntax.

## Pay a Proceeds endpoint

Every Proceeds paywall exposes an x402 URL. Hand it to your agent and let Circle CLI handle the `402` challenge, payment, and retry:

```bash theme={null}
https://myproceeds.xyz/api/x402/pay/{serviceId}/{slug}
```

A prompt to your agent can be as simple as:

```text theme={null}
Use Circle CLI to pay https://myproceeds.xyz/api/x402/pay/{serviceId}/{slug} from my Agent Wallet
and return the response.
```

### Sub-cent paywalls

When the paywall is priced below `$0.01`, settlement runs through Circle Gateway as a [nanopayment](/standards/circle-nanopayments): your agent signs an offchain authorization at zero gas, Proceeds serves the resource immediately, and Gateway settles authorizations in batches. This is the economical path for per-token inference or per-query data billing.

## Confirm the payment

Watch the matching transaction move from `Pending` to `Completed` in [Transactions](/dashboard/transactions), and trace `Request → Payment → Fulfillment` in [Events](/dashboard/events). Nanopayment-eligible transactions are flagged with a `Nano` badge, and your Gateway balance appears under **Circle Nanopayments** in the [Wallet](/dashboard/wallet) page.

## When to use Circle Agent Stack

* You want Circle-native Agent Wallets with spending policies and compliance guardrails.
* Your target paywall is priced sub-cent and accepts Circle Nanopayments.
* You're already building on Circle products like CCTP or Gateway.

<CardGroup cols={2}>
  <Card title="Circle Agent Stack" icon="book" href="https://developers.circle.com/agent-stack">
    Agent wallets, nanopayments, and the Circle CLI command reference.
  </Card>

  <Card title="Agents overview" icon="robot" href="/agents/overview">
    Compare Circle Agent Stack with AgentCash and Tempo Wallet.
  </Card>

  <Card title="Circle Nanopayments" icon="coins" href="/standards/circle-nanopayments">
    How gas-free sub-cent settlement works inside Proceeds.
  </Card>

  <Card title="x402 standard" icon="credit-card" href="/standards/x402">
    The request flow Circle CLI uses against Proceeds paywalls.
  </Card>
</CardGroup>
