How to Set Up an Agentic Wallet in Under 2 Minutes

You can deploy a functional agentic wallet for your AI agent in under 2 minutes using the Coinbase Developer Platform CLI. The streamlined setup process includes agent authentication via email OTP, wallet funding with USDC, and deployment of pre-built financial skills (trade, earn, send) with simple commands, enabling autonomous agent operation without complex blockchain integration work.

What You'll Learn

  • Prerequisites for setting up an agentic wallet
  • Step-by-step CLI installation and agent authentication
  • How to configure security guardrails (spending limits, session caps)
  • Adding financial skills (authenticate, fund, send, trade, earn)
  • Testing your first autonomous transaction
  • Monitoring and managing your agent wallet

Prerequisites

Before deploying an agentic wallet, ensure you have:

1. Coinbase Developer Platform Account Sign up at Coinbase Developer Platform to access the CDP infrastructure. Free tier supports development and testing with rate limits on API calls. Production deployments typically require a paid tier for higher throughput.

2. Node.js or Python Runtime The CDP CLI requires Node.js 16+ or Python 3.8+. Check your version:

node --version # Should show v16.0.0 or higher

OR

python --version # Should show 3.8.0 or higher

3. USDC for Wallet Funding Agentic wallets operate with USDC (USD Coin stablecoin). You'll need a small amount to fund your agent wallet (minimum $10 recommended for testing). You can purchase USDC on Coinbase, transfer from another wallet, or use an on-ramp service.

4. Email Address for Agent Authentication Agents authenticate using email-based one-time passwords. Provide an email address you control for receiving OTP codes during setup.

Step 1: Install the CDP CLI (30 seconds)

Option A: Install via npm (Node.js)

npm install -g @coinbase/cdp-cli

Option B: Install via pip (Python)

pip install coinbase-cdp-cli

Option C: Direct Download

Download the pre-compiled binary for your operating system from the CDP CLI releases page.

Verify installation:

cdp --version

Should display: CDP CLI v1.2.0 (or current version)

Step 2: Authenticate Your Agent (30 seconds)

Create a unique agent identity using email-based authentication.

Run the authentication command:

cdp agent create --email your-agent@example.com

What happens:

  1. CLI sends a one-time password to the provided email
  2. Check your email for the OTP code (typically arrives within 10 seconds)
  3. Enter the 6-digit code when prompted
  4. CLI generates agent credentials and displays your wallet address

Example output:

✓ OTP sent to your-agent@example.com
Enter OTP code: 123456
✓ Agent authenticated successfully

Agent ID: agent_a1b2c3d4e5f6
Wallet Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0

Next step: Fund your wallet with USDC at the address above

Save your agent credentials: The CLI stores authentication locally in ~/.cdp/credentials.json. Back up this file securely. If lost, you'll need to create a new agent and transfer funds.

Step 3: Fund the Wallet (30 seconds)

Transfer USDC to your agent's wallet address to enable transactions.

Option A: Transfer from Coinbase

  1. Log into your Coinbase account
  2. Navigate to USDC in your portfolio
  3. Click "Send"
  4. Enter your agent wallet address from Step 2
  5. Enter amount (minimum $10 recommended for testing)
  6. Confirm transaction

Settlement time: Typically 10-30 seconds on Base network

Option B: Transfer from Another Wallet

Use MetaMask, Coinbase Wallet, or any Ethereum-compatible wallet:

  1. Select USDC token
  2. Send to agent wallet address
  3. Ensure you're on the correct network (Base recommended for gasless transactions)

Check wallet balance:

cdp agent balance

Output: 10.00 USDC on Base

Step 4: Configure Security Guardrails (30 seconds)

Set spending limits to control autonomous agent behavior.

Configure session caps and transaction limits:

cdp agent config set-limits \
--session-cap 500 \
--transaction-limit 100 \
--session-duration 24h

Parameter explanations:

  • --session-cap 500: Agent can spend maximum $500 worth of USDC per session
  • --transaction-limit 100: Individual transactions capped at $100
  • --session-duration 24h: Session cap resets every 24 hours

Recommended limit configurations by use case:

Use Case Session Cap Transaction Limit Rationale
API payments $50 $5 Micro-payments for compute/data
DeFi yield farming (small portfolio) $500 $200 Rebalancing within risk tolerance
DeFi yield farming (large portfolio) $5,000 $1,000 Higher capital, larger moves
Agent-to-agent commerce $200 $50 Moderate transaction sizes
Development/testing $20 $5 Minimize risk during testing

View current configuration:

cdp agent config show

Step 5: Deploy Financial Skills (30 seconds)

Activate pre-built financial operations your agent can execute.

Deploy core skills:

cdp skills deploy \
--skills=authenticate,fund,send,trade,earn

Skill descriptions:

authenticate: Email OTP-based agent identity verification (already used in Step 2, but activates for ongoing authentication)

fund: Add USDC to agent wallet from external sources

send: Transfer funds to wallet addresses or other agents

Example send transaction

cdp skills execute send \
--to 0x1234...abcd \
--amount 10 \
--currency USDC

trade: Swap tokens on decentralized exchanges with automatic routing

Example trade transaction

cdp skills execute trade \
--from USDC \
--to ETH \
--amount 50

earn: Stake tokens or provide liquidity for yield

Example earn transaction

cdp skills execute earn \
--protocol aave \
--action deposit \
--amount 100 \
--currency USDC

Verify deployed skills:

cdp skills list

Output:

✓ authenticate

✓ fund

✓ send

✓ trade

✓ earn

Step 6: Test Your First Autonomous Transaction (30 seconds)

Execute a simple test transaction to verify wallet functionality.

Send a small amount to test address:

cdp skills execute send \
--to 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0 \
--amount 1 \
--currency USDC \
--test-mode

What happens during execution:

  1. CLI submits transaction request to CDP API
  2. Infrastructure validates against spending limits (session cap, transaction limit)
  3. KYT screening checks recipient address against risk databases
  4. If approved, Trusted Execution Environment signs transaction
  5. Transaction broadcasts to blockchain (Base network by default)
  6. CLI returns transaction hash and confirmation

Example output:

✓ Transaction validated (within spending limits)
✓ KYT screening passed
✓ Transaction signed in TEE
✓ Broadcasting to Base network...

Transaction Hash: 0xabcdef1234567890...
Status: Confirmed
Block Number: 12,345,678
Gas Used: 0 (gasless on Base)

Verify transaction:

cdp transaction status 0xabcdef1234567890...

Shows full transaction details and current status

Integration with AI Frameworks

Now that your agentic wallet is operational, integrate it with your AI agent framework.

LangChain Integration

from langchain.agents import create_react_agent
from coinbase_cdp import AgenticWalletTool

Initialize agentic wallet as a LangChain tool

wallet_tool = AgenticWalletTool(
credentials_path="~/.cdp/credentials.json",
allowed_skills=["send", "trade", "earn"]
)

Add to agent's toolset

tools = [wallet_tool, other_tools...]

agent = create_react_agent(llm, tools, prompt)

OpenAI Function Calling

import openai
from coinbase_cdp import AgenticWallet

wallet = AgenticWallet.from_credentials("~/.cdp/credentials.json")

functions = [
{
"name": "send_usdc",
"description": "Send USDC to a wallet address",
"parameters": {
"type": "object",
"properties": {
"to": {"type": "string", "description": "Recipient address"},
"amount": {"type": "number", "description": "Amount in USDC"}
},
"required": ["to", "amount"]
}
}
]

response = openai.ChatCompletion.create(
model="gpt-4",
messages=messages,
functions=functions,
function_call="auto"
)

Execute function if called

if response.choices[0].message.get("function_call"):
function_args = json.loads(response.choices[0].message.function_call.arguments)
wallet.send(to=function_args["to"], amount=function_args["amount"], currency="USDC")

Model Context Protocol (MCP)

For AI models like Claude that support MCP:

Enable MCP server for wallet access

cdp mcp start --port 3000

In your Claude app/config, add MCP server:

"mcp_servers": [

{

"type": "url",

"url": "http://localhost:3000/mcp",

"name": "agentic-wallet"

}

]

Monitoring and Management

CDP Portal Dashboard

Access portal.cdp.coinbase.com to:

  • View real-time transaction history
  • Monitor spending patterns and limit usage
  • Adjust session caps and transaction limits
  • Set up alerts for unusual activity
  • Review KYT screening decisions
  • Generate compliance reports

CLI Monitoring Commands

Check wallet balance:

cdp agent balance

View transaction history:

cdp transaction list --limit 20

Monitor spending against limits:

cdp agent limits

Output:

Session Cap: $245 / $500 used (49%)

Transaction Limit: $100 (per transaction)

Session Resets: 8 hours 23 minutes

Set up alerts:

cdp alerts create \
--type spending-threshold \
--threshold 80 \
--email admin@example.com

Troubleshooting Common Issues

Issue: "Insufficient balance" error

Solution: Fund wallet with more USDC

cdp agent balance # Check current balance

Transfer additional USDC to wallet address

Issue: "Session cap exceeded"

Solution: Wait for session reset or increase cap

cdp agent limits # Check when session resets

OR increase cap if appropriate:

cdp agent config set-limits --session-cap 1000

Issue: "Transaction blocked by KYT screening"

Solution: Recipient address flagged as high-risk. Verify the address is legitimate and not on sanctions lists. If error, contact CDP support.

Issue: "Agent authentication expired"

Solution: Re-authenticate using email OTP

cdp agent reauth --email your-agent@example.com

Next Steps

Your agentic wallet is now operational. Recommended next actions:

  1. Test DeFi operations: Try trade and earn skills with small amounts
  2. Integrate with your agent: Connect wallet to your AI framework (LangChain, OpenAI, MCP)
  3. Monitor for 24-48 hours: Observe agent behavior and adjust spending limits if needed
  4. Scale gradually: Start with low limits, increase as you gain confidence in agent logic
  5. Review compliance: Ensure agent operations align with your jurisdiction's regulations

Frequently Asked Questions

Q: Can I use the same agentic wallet for multiple agents? Yes, but best practice is one wallet per agent for clear accountability and isolated risk. Create separate wallets using unique email addresses.

Q: What happens if I lose my credentials file? You'll lose access to the agent wallet. The wallet still exists on-chain with funds intact, but you cannot execute transactions without credentials. Back up ~/.cdp/credentials.json securely.

Q: Can I increase spending limits later? Yes, adjust limits anytime using cdp agent config set-limits. Changes take effect immediately.

Q: How do gasless transactions work on Base? Coinbase subsidizes gas fees for agentic wallet users on Base. Transactions execute without requiring the agent to maintain ETH for gas, eliminating a common failure point.

Q: Can I export my agent wallet to a traditional wallet? Not directly. Agentic wallets use TEE-based key management not compatible with traditional wallet seed phrases. You can transfer funds from the agentic wallet to a traditional wallet address.


{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "How to Set Up an Agentic Wallet in Under 2 Minutes",
"description": "Step-by-step tutorial for deploying functional agentic wallets using CDP CLI with agent authentication, funding, and skill deployment",
"totalTime": "PT2M",
"step": [
{
"@type": "HowToStep",
"name": "Install the CDP CLI",
"text": "Install Coinbase Developer Platform CLI via npm, pip, or direct download. Verify installation with cdp --version command.",
"position": 1
},
{
"@type": "HowToStep",
"name": "Authenticate Your Agent",
"text": "Run 'cdp agent create --email your-agent@example.com', enter OTP code from email, and receive agent wallet address.",
"position": 2
},
{
"@type": "HowToStep",
"name": "Fund the Wallet",
"text": "Transfer USDC to agent wallet address from Coinbase account or compatible wallet. Check balance with 'cdp agent balance'.",
"position": 3
},
{
"@type": "HowToStep",
"name": "Configure Security Guardrails",
"text": "Set spending limits with 'cdp agent config set-limits --session-cap 500 --transaction-limit 100 --session-duration 24h'.",
"position": 4
},
{
"@type": "HowToStep",
"name": "Deploy Financial Skills",
"text": "Activate pre-built operations with 'cdp skills deploy --skills=authenticate,fund,send,trade,earn'.",
"position": 5
},
{
"@type": "HowToStep",
"name": "Test First Transaction",
"text": "Execute test transaction with 'cdp skills execute send --to ADDRESS --amount 1 --currency USDC --test-mode'.",
"position": 6
}
]
}