Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

AgentKit supports multiple wallet providers, with CDP non-custodial wallet being the default implementation.

Wallet Configuration

You can configure AgentKit to use a CDP wallet or a custom wallet provider.
The CDP non-custodial wallet 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.
import {
  AgentKit,
  CdpV2WalletProvider,
  CdpV2EvmWalletProvider, // for evm
  CdpV2SolanaWalletProvider, // for solana
} from "@coinbase/agentkit";

// Configure CDP Wallet Provider
const 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 AgentKit
const agentkit = await AgentKit.from({
  walletProvider,
  actionProviders: [],
});

Default Operations

By default, AgentKit supports the following basic wallet operations:
  • get_wallet_details - Get details about the Wallet, like the address
  • transfer - Transfer assets between addresses
  • get_balance - Get the balance of an asset
You can add additional actions or action providers upon agent instantiation.