# CDP Agentic Wallet

## What This Is

Agentic Wallet gives AI agents their own wallets for autonomous operations — browsing paid API marketplaces, paying for services with USDC, and monetizing their own endpoints. It's designed for AI-to-AI commerce via the x402 protocol.

**When to use Agentic Wallet vs Server Wallets:**

| Use Case                                    | Tool                                      |
| ------------------------------------------- | ----------------------------------------- |
| Backend treasury, burns, payouts            | Server Wallets (cdp-server-wallets skill) |
| Agent browsing x402 bazaar, paying for APIs | Agentic Wallet (this skill)               |
| MCP server internal wallet                  | Server Wallets                            |
| Autonomous agent commerce                   | Agentic Wallet                            |

**TL;DR:** Server Wallets = programmatic backend. Agentic Wallet = agent autonomy.

***

## Components

| Component     | What                                        |
| ------------- | ------------------------------------------- |
| `awal` CLI    | Command-line wallet management              |
| Agent Skills  | 7 pre-built skills for Vercel AI SDK agents |
| x402 Bazaar   | Marketplace for discovering paid APIs       |
| Wallet Server | Local daemon managing keys + signing        |

***

## Prerequisites

* Node.js 24+
* Email address for wallet auth (each agent gets its own wallet)

***

## CLI Reference

```bash
# Authentication
npx awal auth login you@example.com      # sends OTP to email
npx awal auth verify <flowId> <otp>       # complete auth
npx awal status                            # check health + auth

# Wallet operations
npx awal balance [--chain base]           # USDC balance
npx awal address                           # wallet address
npx awal show                              # open companion window

# Transactions
npx awal send <amount> <recipient>         # send USDC (ENS supported)
npx awal trade <amount> <from> <to>        # swap tokens on Base

# x402 Commerce
npx awal x402 bazaar search <query>        # find paid APIs
npx awal x402 pay <url>                    # make paid API request

# JSON output for scripting
npx awal balance --json
npx awal status --json
```

**Network:** `--chain base` (default) or `--chain base-sepolia` (testnet). Trading is Base mainnet only.

***

## 7 Agent Skills

Install via Vercel AI SDK skills framework:

```bash
npx skills add coinbase/agentic-wallet-skills
```

| Skill                 | What It Does                          |
| --------------------- | ------------------------------------- |
| `authenticate-wallet` | Sign in via email OTP                 |
| `fund`                | Add money via Coinbase Onramp         |
| `send-usdc`           | Transfer USDC to address/ENS          |
| `trade`               | Swap tokens on Base (gasless)         |
| `search-for-service`  | Find paid APIs in x402 bazaar         |
| `pay-for-service`     | Execute x402 paid API request         |
| `monetize-service`    | Create and deploy a paid API endpoint |

Once installed, agents automatically recognize wallet-related requests and trigger the appropriate skill.

***

## CLAUDIA Use Cases

### Use Case 1: CLAUDIA Agent Pays for External Data

When CLAUDIA's full analysis agent needs premium data from an x402-gated API:

```
CLAUDIA Full Analysis request for $PEPE
  → Agent decides it needs Coinglass funding data
  → Agentic Wallet: search-for-service "coinglass funding rates"
  → Finds x402 endpoint at api.coinglass.com/v1/funding
  → Agentic Wallet: pay-for-service → pays $0.01 USDC
  → Receives funding rate data
  → Incorporates into analysis context
  → Delivers response to user
```

### Use Case 2: CLAUDIA Monetizes Its Own MCP Tools

External agents discover and pay for CLAUDIA's analysis:

```
External AI agent (Cursor, Claude Code, etc.)
  → awal x402 bazaar search "crypto analysis"
  → Finds mcp.claudia.wtf Full Analysis ($0.05/call)
  → awal x402 pay https://mcp.claudia.wtf/api/analysis
  → USDC settles on Base
  → Receives analysis JSON
```

To monetize, CLAUDIA registers its endpoints:

```bash
# From CLAUDIA's MCP server
npx awal x402 monetize \
  --url https://mcp.claudia.wtf/api/analysis \
  --price 0.05 \
  --description "CLAUDIA Full Analysis — multi-agent DeFi intelligence"
```

### Use Case 3: Agent-to-Agent Commerce Network

CLAUDIA agents pay other project agents, and vice versa:

```
CLAUDIA → pays Zerion agent for portfolio data ($0.01)
CLAUDIA → pays Basescan agent for contract verification ($0.02)
External agent → pays CLAUDIA for scanner results ($0.01)
External agent → pays CLAUDIA for full analysis ($0.05)
```

All settled in USDC on Base, no API keys, no accounts, no subscriptions.

***

## Security Model

* Private keys NEVER leave Coinbase infrastructure
* Agent never sees or handles keys
* Spending limits configurable per session and per transaction
* KYT (Know Your Transaction) screening on every operation
* OFAC sanctions list screening automatic

**Spending limits for CLAUDIA agents:**

* Per transaction: $1 max (individual API calls)
* Per session: $10 max (daily budget)
* These prevent runaway spending if agent logic has bugs

***

## Integration with CLAUDIA's Existing x402 Setup

The `base-x402-payments` skill already defines CLAUDIA as both x402 server (charging for analysis) and x402 client (paying for external APIs). Agentic Wallet provides the **wallet infrastructure** for the client side:

```
base-x402-payments skill:
  - Server: @x402/next withX402 middleware (charges agents)
  - Client: @x402/axios wrapAxiosWithPayment (pays for APIs)

cdp-agentic-wallet skill (this):
  - Provides the WALLET that @x402/axios uses to sign payments
  - Provides the BAZAAR for discovering x402 services
  - Provides the MONETIZATION for listing CLAUDIA's endpoints
```

***

## Wallet Setup for CLAUDIA Agents

Give each agent component that needs autonomous spending its own wallet:

```bash
# MCP server agent (pays for external x402 APIs)
npx awal auth login mcp-agent@example.com

# Scanner agent (pays for premium data feeds)
npx awal auth login scanner@example.com

# Full analysis agent (pays for deep data)
npx awal auth login analysis@example.com
```

Fund each wallet with small USDC amounts ($5-10) for autonomous operation.

***

## When NOT to Use Agentic Wallet

* Backend treasury operations → use Server Wallets
* Automated burns → use Server Wallets
* Creator payouts → use Server Wallets
* User-facing transactions → use Paymaster + Smart Accounts
* One-off admin operations → use Server Wallets

Agentic Wallet is specifically for **agent autonomy** — when the AI needs to independently discover, evaluate, and pay for services without human intervention.

***

## Common Mistakes

1. **Using Agentic Wallet for treasury** — wrong tool. Use Server Wallets.
2. **Not setting spending limits** — agent could drain wallet on bad logic
3. **Sharing wallet across agents** — each agent should have its own email/wallet
4. **Forgetting to fund wallet** — x402 payments fail silently with empty wallet
5. **Running awal on CF Workers** — awal is a CLI tool, needs Node.js runtime (Railway)
6. **Not monitoring wallet balance** — set up alerts when balance drops below $1

***

## See Also

* `cdp-server-wallets` — backend wallet operations (treasury, burns, payouts)
* `base-x402-payments` — x402 protocol integration (server + client patterns)
* `claudia-mcp-server` — MCP server that monetizes CLAUDIA's tools
* Agentic Wallet docs: <https://docs.cdp.coinbase.com/agentic-wallet/welcome>
* Agentic Wallet skills repo: <https://github.com/coinbase/agentic-wallet-skills>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.claudia.wtf/for-developers/cdp-agentic-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
