Claude-skill-registry agentkit
Coinbase AgentKit - Toolkit for enabling AI agents with crypto wallets and onchain capabilities. Use for building autonomous agents that can execute transfers, swaps, DeFi operations, NFT minting, smart contract deployment, and gasless transactions via Smart Wallets.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/agentkit" ~/.claude/skills/majiayu000-claude-skill-registry-agentkit && rm -rf "$T"
skills/data/agentkit/SKILL.md- global npm install
- pip install
- references .env files
Coinbase AgentKit Skill
AgentKit is Coinbase Developer Platform's toolkit that enables AI agents to interact with blockchain networks through secure wallet management and comprehensive onchain capabilities. Built on the Coinbase Developer Platform (CDP) SDK, it provides everything needed to create autonomous agents that can perform sophisticated blockchain operations.
Core Mission: "Every AI agent deserves a wallet."
Repository Stats: 1,000+ GitHub stars | 590 forks | 90+ contributors | 578 dependent projects
When to Use This Skill
This skill should be triggered when:
- Building AI agents with crypto wallet capabilities
- Creating autonomous agents that need to execute blockchain transactions
- Implementing token transfers, swaps, or DeFi operations in AI agents
- Deploying smart contracts or NFTs through AI agents
- Integrating LangChain, Vercel AI SDK, MCP, or OpenAI Agents SDK with blockchain functionality
- Building chatbots that can perform onchain actions
- Setting up agents with Coinbase CDP wallet infrastructure
- Creating multi-chain agents (EVM + Solana)
- Implementing gasless transactions with Smart Wallets
- Integrating x402 payment capabilities with AI agents
- Using Pydantic AI or Strands Agents with blockchain features
Quick Reference
Installation
TypeScript (Node.js 22+):
# Quick start with CLI npm create onchain-agent@latest cd onchain-agent mv .env.local .env npm install npm run dev
Python (3.10+):
# Quick start with CLI pipx run create-onchain-agent cd onchain-agent mv .env.local .env poetry install poetry run python chatbot.py
Framework-Specific Packages:
# Core package npm install @coinbase/agentkit # LangChain integration npm install @coinbase/agentkit @coinbase/agentkit-langchain # Vercel AI SDK integration npm install @coinbase/agentkit-vercel-ai-sdk @coinbase/agentkit ai @ai-sdk/openai # MCP integration npm install @coinbase/agentkit @coinbase/agentkit-model-context-protocol # Nightly builds (bleeding edge) npm install @coinbase/agentkit@nightly
Python Packages:
# Core package (v0.7.4+) pip install coinbase-agentkit # LangChain integration pip install coinbase-agentkit-langchain # OpenAI Agents SDK integration pip install coinbase-agentkit-openai-agents-sdk # Pydantic AI integration pip install coinbase-agentkit-pydantic-ai # Strands Agents integration pip install coinbase-agentkit-strands # Nightly builds pip install --pre coinbase-agentkit
Environment Setup
# Required CDP_API_KEY_NAME=your_api_key_name CDP_API_KEY_PRIVATE_KEY=your_private_key OPENAI_API_KEY=your_openai_key # Optional NETWORK_ID=base-sepolia # or base-mainnet, ethereum-mainnet, solana-devnet
Basic Agent Setup (TypeScript)
import { AgentKit, CdpWalletProvider } from "@coinbase/agentkit"; import { getLangChainTools } from "@coinbase/agentkit-langchain"; import { ChatOpenAI } from "@langchain/openai"; import { createReactAgent } from "@langchain/langgraph/prebuilt"; // Initialize wallet provider const walletProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", }); // Create AgentKit instance const agentKit = await AgentKit.from({ walletProvider, actionProviders: [ cdpApiActionProvider, erc20ActionProvider, walletActionProvider, ], }); // Get tools for LangChain const tools = await getLangChainTools(agentKit); // Create agent const llm = new ChatOpenAI({ model: "gpt-4o" }); const agent = createReactAgent({ llm, tools }); // Execute const result = await agent.invoke({ messages: [{ role: "user", content: "What's my wallet address?" }], });
Basic Agent Setup (Python)
from coinbase_agentkit import AgentKit, CdpWalletProvider from coinbase_agentkit_langchain import get_langchain_tools from langchain_openai import ChatOpenAI from langgraph.prebuilt import create_react_agent # Initialize wallet provider wallet_provider = CdpWalletProvider.configure_with_wallet( network_id="base-sepolia" ) # Create AgentKit instance agent_kit = AgentKit.from_config(wallet_provider=wallet_provider) # Get tools for LangChain tools = get_langchain_tools(agent_kit) # Create agent llm = ChatOpenAI(model="gpt-4o") agent = create_react_agent(llm, tools) # Execute result = agent.invoke({ "messages": [{"role": "user", "content": "What's my wallet balance?"}] })
Package Reference
| Package | Purpose |
|---|---|
| Core SDK with wallet providers and action providers (50+ actions) |
| LangChain framework integration |
| Vercel AI SDK integration |
| MCP server integration |
| Python core SDK (v0.7.4, 30+ actions) |
| Python LangChain integration |
| OpenAI Agents SDK integration |
| Pydantic AI integration |
| Strands Agents integration |
Wallet Providers
EVM Wallet Providers
| Provider | Description |
|---|---|
| CDP V2 API Server Wallet (standard) |
| CDP Smart Wallets (ERC-4337, gasless transactions) |
| CDP Smart Wallets (alternative interface) |
| Viem library-based wallet |
| Privy embedded/server wallets |
| ZeroDev smart accounts (chain abstraction) |
| Local private key for any EVM chain |
SVM (Solana) Wallet Providers
| Provider | Description |
|---|---|
| CDP V2 API for Solana |
| CDP Solana wallet (mainnet, devnet, testnet) |
| Direct keypair wallet |
| Privy Solana mode |
Wallet Provider Configuration
// CDP EVM Wallet Provider const walletProvider = await CdpEvmWalletProvider.configureWithWallet({ networkId: "base-sepolia", // Optional: persist wallet cdpWalletData: existingWalletData, }); // Smart Wallet Provider (gasless transactions) const smartWalletProvider = await CdpSmartWalletProvider.configureWithWallet({ networkId: "base-sepolia", signer: cdpWalletProvider, // Enable gasless via paymaster paymasterUrl: "https://paymaster.base.org", }); // Solana Wallet Provider const solanaProvider = await CdpSolanaWalletProvider.configureWithWallet({ networkId: "solana-devnet", }); // ZeroDev Wallet Provider (chain abstraction) const zeroDevProvider = await ZeroDevWalletProvider.configureWithWallet({ projectId: "your-zerodev-project-id", networkId: "base-sepolia", });
Action Providers
AgentKit includes 50+ TypeScript and 30+ Python action providers:
Core Actions
| Action Provider | Actions |
|---|---|
| , , |
| , , |
| , , , |
| , , |
DeFi Protocol Actions
| Action Provider | Actions |
|---|---|
| , , , |
| , , , |
| , |
| , , , |
| Token streaming operations |
| Vault operations |
Swap & Bridge Actions
| Action Provider | Actions |
|---|---|
| Solana token swaps |
| 0x swap integration |
| Sushi swap integration |
| Cross-chain bridging |
NFT & Token Actions
| Action Provider | Actions |
|---|---|
| Zora NFT platform, coin creation |
| OpenSea marketplace integration |
| , |
| Clanker token creation |
| Token launch functionality |
| WOW memecoin trading |
Social & External Actions
| Action Provider | Actions |
|---|---|
| Post casts, read feed |
| Tweet, read timeline |
| Register names |
| SSH operations |
| AI compute generation |
Data & Oracle Actions
| Action Provider | Actions |
|---|---|
| Price oracle data feeds |
| DeFi data aggregation |
| Crypto research data |
| Portfolio tracking |
Payment & Infrastructure Actions
| Action Provider | Actions |
|---|---|
| x402 payment integration for paid APIs |
| Fiat-to-crypto conversion |
| Encrypted data (SecretVault) |
| DeFi aggregation |
Using Action Providers
import { AgentKit, CdpWalletProvider, cdpApiActionProvider, erc20ActionProvider, compoundActionProvider, walletActionProvider, x402ActionProvider, superfluidActionProvider, } from "@coinbase/agentkit"; const agentKit = await AgentKit.from({ walletProvider, actionProviders: [ cdpApiActionProvider, erc20ActionProvider, compoundActionProvider({ networkId: "base-sepolia" }), walletActionProvider, x402ActionProvider, superfluidActionProvider, ], });
Smart Wallets & Gasless Transactions
Smart Wallets are ERC-4337 compliant smart contract wallets providing:
- Gasless transactions - No ETH required for gas fees
- Batch operations - Multiple actions in one transaction
- Account recovery - Secure recovery mechanisms
- Sponsored transactions - Via paymaster integration
Note: Smart Wallets are currently only supported on Base networks (base-sepolia, base-mainnet).
import { CdpSmartWalletProvider } from "@coinbase/agentkit"; // Configure Smart Wallet with gasless transactions const smartWalletProvider = await CdpSmartWalletProvider.configureWithWallet({ networkId: "base-mainnet", // Enable gasless via paymaster paymasterUrl: "https://your-paymaster.example.com", }); // Create AgentKit with smart wallet const agentKit = await AgentKit.from({ walletProvider: smartWalletProvider, actionProviders: [walletActionProvider, erc20ActionProvider], }); // Agent can now transact without holding ETH for gas
Framework Integrations
LangChain Integration
import { AgentKit, CdpWalletProvider } from "@coinbase/agentkit"; import { getLangChainTools } from "@coinbase/agentkit-langchain"; import { ChatOpenAI } from "@langchain/openai"; import { createReactAgent } from "@langchain/langgraph/prebuilt"; import { MemorySaver } from "@langchain/langgraph"; // Setup AgentKit const walletProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", }); const agentKit = await AgentKit.from({ walletProvider }); // Create LangChain tools const tools = await getLangChainTools(agentKit); // Create agent with memory const llm = new ChatOpenAI({ model: "gpt-4o" }); const memory = new MemorySaver(); const agent = createReactAgent({ llm, tools, checkpointSaver: memory, }); // Stream responses const stream = await agent.stream( { messages: [{ role: "user", content: "Transfer 0.01 ETH to 0x..." }] }, { configurable: { thread_id: "session-1" } } ); for await (const chunk of stream) { console.log(chunk); }
Vercel AI SDK Integration
import { AgentKit, CdpWalletProvider } from "@coinbase/agentkit"; import { getVercelAITools } from "@coinbase/agentkit-vercel-ai-sdk"; import { openai } from "@ai-sdk/openai"; import { generateText } from "ai"; // Setup AgentKit const walletProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", }); const agentKit = await AgentKit.from({ walletProvider }); // Get Vercel AI tools const tools = getVercelAITools(agentKit); // Generate response const { text } = await generateText({ model: openai("gpt-4o"), tools, maxSteps: 10, prompt: "What is my wallet balance?", });
MCP Server Integration
import { AgentKit, CdpWalletProvider } from "@coinbase/agentkit"; import { getMcpTools } from "@coinbase/agentkit-model-context-protocol"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; // Setup AgentKit const walletProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", }); const agentKit = await AgentKit.from({ walletProvider }); // Create MCP server const server = new McpServer({ name: "agentkit-mcp", version: "1.0.0" }); // Register AgentKit tools const tools = getMcpTools(agentKit); tools.forEach((tool) => server.tool(tool.name, tool.description, tool.schema, tool.handler)); // Start server const transport = new StdioServerTransport(); await server.connect(transport);
Claude Desktop Configuration
{ "mcpServers": { "agentkit": { "command": "node", "args": ["/path/to/agentkit-mcp-server.js"], "env": { "CDP_API_KEY_NAME": "your_key_name", "CDP_API_KEY_PRIVATE_KEY": "your_private_key", "NETWORK_ID": "base-sepolia" } } } }
OpenAI Agents SDK Integration (Python)
from agents import Agent, Runner from coinbase_agentkit import AgentKit, CdpWalletProvider from coinbase_agentkit_openai_agents_sdk import get_openai_tools # Setup AgentKit wallet_provider = CdpWalletProvider.configure_with_wallet( network_id="base-sepolia" ) agent_kit = AgentKit.from_config(wallet_provider=wallet_provider) # Get OpenAI tools tools = get_openai_tools(agent_kit) # Create agent agent = Agent( name="Crypto Agent", instructions="You are an AI agent with a crypto wallet. Help users with onchain operations.", tools=tools, ) # Run agent result = await Runner.run(agent, "What's my wallet address?") print(result.final_output)
Pydantic AI Integration (Python)
from coinbase_agentkit import AgentKit, CdpWalletProvider from coinbase_agentkit_pydantic_ai import get_pydantic_tools # Setup AgentKit wallet_provider = CdpWalletProvider.configure_with_wallet( network_id="base-sepolia" ) agent_kit = AgentKit.from_config(wallet_provider=wallet_provider) # Get Pydantic AI tools tools = get_pydantic_tools(agent_kit)
Supported Networks
EVM Networks
| Network | ID | Status |
|---|---|---|
| Base Mainnet | | Production |
| Base Sepolia | | Testnet |
| Ethereum Mainnet | | Production |
| Ethereum Sepolia | | Testnet |
| Arbitrum | | Production |
| Optimism | | Production |
| Polygon | | Production |
SVM Networks
| Network | ID | Status |
|---|---|---|
| Solana Mainnet | | Production |
| Solana Devnet | | Testnet |
| Solana Testnet | | Testnet |
Common Patterns
Persisting Wallet Data
// Export wallet data for persistence const walletData = await walletProvider.exportWallet(); // Store walletData securely (encrypted in database, etc.) // Restore wallet from data const restoredProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", cdpWalletData: walletData, });
Creating Custom Action Providers
import { ActionProvider, CreateAction, ActionMetadata } from "@coinbase/agentkit"; import { z } from "zod"; class MyActionProvider extends ActionProvider { @CreateAction({ name: "my_custom_action", description: "Does something custom", schema: z.object({ param: z.string().describe("A parameter"), }), }) async myCustomAction(params: { param: string }): Promise<string> { // Implementation return `Processed: ${params.param}`; } } // Register custom provider const agentKit = await AgentKit.from({ walletProvider, actionProviders: [new MyActionProvider()], });
Python Custom Action Provider
from coinbase_agentkit import ActionProvider, create_action from pydantic import BaseModel class MyParams(BaseModel): param: str class MyActionProvider(ActionProvider): @create_action( name="my_custom_action", description="Does something custom", schema=MyParams, ) async def my_custom_action(self, params: MyParams) -> str: return f"Processed: {params.param}"
Multi-Chain Agent
// EVM wallet for Base const evmProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", }); // Solana wallet const solanaProvider = await CdpV2SolanaWalletProvider.configureWithWallet({ networkId: "solana-devnet", }); // Create agents for each chain const evmAgentKit = await AgentKit.from({ walletProvider: evmProvider }); const solanaAgentKit = await AgentKit.from({ walletProvider: solanaProvider });
x402 Payment Integration
import { AgentKit, CdpWalletProvider, x402ActionProvider } from "@coinbase/agentkit"; const agentKit = await AgentKit.from({ walletProvider, actionProviders: [x402ActionProvider], }); // Agent can now make x402 payments for paid APIs
Idempotent Wallet Creation
// Create deterministic wallet using idempotency key const walletProvider = await CdpWalletProvider.configureWithWallet({ networkId: "base-sepolia", idempotencyKey: "user-123-wallet", // Same key always returns same wallet });
CLI Tools
TypeScript CLI
# Install globally npm install -g @coinbase/agentkit # Generate components agentkit generate wallet-provider # Custom wallet provider agentkit generate action-provider # Custom action provider agentkit generate prepare # Framework-agnostic setup agentkit generate create-agent # Framework-specific agent
Python CLI
# Create new project pipx run create-onchain-agent # With beginner defaults pipx run create-onchain-agent --beginner
Security Considerations
- Wallet Isolation: Each agent should have its own dedicated wallet
- Fund Limits: Only fund agent wallets with amounts needed for operations
- Key Management: Store CDP API keys and wallet data securely
- Network Selection: Use testnets (base-sepolia, solana-devnet) for development
- Action Auditing: Log all agent actions for review
- Smart Wallet Benefits: Use Smart Wallets for enhanced security features
Important Disclaimer: "Acts proposed or performed by an agent through AgentKit software are NOT acts of Coinbase." Use at your own risk. The software is novel and experimental, provided on an AS-IS basis.
Q1 2025 Milestones
Key features shipped in Q1 2025:
- Smart Wallet Integration: Gasless transactions via CDP Smart Wallet API
- Built-in Faucet: Seamless testing on Base Sepolia
- Onramps: Fiat-to-crypto conversion in agent apps
- Smart Contract Deployment: Agents can deploy contracts onchain
- Solana Support: Expanded beyond EVM ecosystem
- Quickstart CLI: One-command project setup
- OpenAI Agents SDK Integration: Day-one support
USDC Rewards
USDC held in agent wallets is eligible for 4.1% rewards when using CDP wallets.
Reference Files
This skill includes comprehensive documentation in
references/:
- wallet-providers.md - Detailed wallet provider configuration
- action-providers.md - Complete action provider reference (50+ actions)
- framework-integrations.md - LangChain, Vercel AI SDK, MCP, OpenAI, Pydantic examples
Resources
- AgentKit Documentation
- GitHub Repository
- npm Package
- PyPI Package
- Python API Reference
- AgentKit Quickstart
- Architecture Explained
- Wallet Management
- MCP Integration
- Vercel AI SDK Integration
- Smart Wallets Guide
- Community Guides
- FAQ
- AgentKit Q1 Update
Notes
- AgentKit is framework-agnostic (works with LangChain, Vercel AI SDK, MCP, OpenAI, Pydantic AI, Strands, etc.)
- AgentKit is wallet-agnostic (supports CDP, Privy, Viem, ZeroDev wallets)
- 50+ action providers in TypeScript, 30+ in Python
- Supports EVM chains (Base, Ethereum, Arbitrum, etc.) and Solana
- USDC held in agent wallets is eligible for 4.1% rewards
- Smart Wallets enable gasless transactions on Base networks
- Built on CDP SDK with secure wallet infrastructure
- Licensed under Apache 2.0
Version History
-
1.1.0 (2026-01-09): Enhanced with Q1 2025 updates
- Added Smart Wallet gasless transaction documentation
- Added 20+ new action providers (Across, Superfluid, Enso, Zora coins, etc.)
- Added Pydantic AI and Strands Agents integrations
- Added ZeroDev and additional wallet providers
- Updated Python package version to 0.7.4
- Added Q1 2025 milestones section
- Enhanced custom action provider examples
- Added idempotent wallet creation pattern
-
1.0.0 (2026-01-08): Initial release
- Core AgentKit documentation
- Wallet providers reference (CDP, Smart, Viem, Privy, Solana)
- Action providers reference (50+ actions)
- Framework integrations (LangChain, Vercel AI SDK, MCP, OpenAI)
- Multi-chain support (EVM + Solana)
- CLI tools documentation