AgentKit supports multiple wallet providers, with the CDP Wallet API being the default implementation. It supports the following operations, alongside compatibility with the full suite of CDP products including Onramp, and Commerce:
You can configure AgentKit to use a CDP wallet or a custom wallet provider.
The CDP Wallet v2 API is the recommended wallet provider for AgentKit. It supports both EVM and Solana chains, seamlessly and securely handles private keys, and is compatible with viem.
Copy
Ask AI
import { AgentKit, CdpV2WalletProvider, CdpV2EvmWalletProvider, // for evm CdpV2SolanaWalletProvider, // for solana} from "@coinbase/agentkit";// Configure CDP Wallet Providerconst cdpWalletConfig = { apiKeyId: process.env.CDP_API_KEY_ID, // from https://portal.cdp.coinbase.com , see v2 wallet quickstart for more details apiKeySecret: process.env.CDP_API_KEY_SECRET, walletSecret: process.env.CDP_WALLET_SECRET, idempotencyKey: process.env.IDEMPOTENCY_KEY, // optional, used for account creation address: process.env.ADDRESS as `0x${string}` | undefined, // optional, used for existing account networkId: process.env.NETWORK_ID, // e.g. "base", "base-sepolia", "solana"};const walletProvider = await CdpV2WalletProvider.configureWithWallet(cdpWalletConfig);// ...// Initialize AgentKitconst agentkit = await AgentKit.from({ walletProvider, actionProviders: [],});