@iqai/plugin-agentkit v0.2.0
š§ Plugin AgentKit
AgentKit plugin for Eliza that enables interaction with CDP AgentKit tools for NFT and token management on Coinbase's CDP platform.
š Overview
This plugin integrates Coinbase's CDP AgentKit tools into your agent, providing:
ā Wallet management for blockchain interactions ā NFT creation, deployment, and minting capabilities ā Token creation and management functionality ā Trading and transfer operations for digital assets ā Network support for Base Sepolia and Base Mainnet
š Installation
Install the plugin using pnpm:
pnpm install @iqai/plugin-agentkit
After installation, you can use the plugin like this:
import { AgentKit } from "@iqai/plugin-agentkit";
// Initialize the plugin with your configuration
const agentKitPlugin = new AgentKit({
apiKeyName: process.env.CDP_API_KEY_NAME,
privateKey: process.env.CDP_API_KEY_PRIVATE_KEY,
network: process.env.CDP_AGENT_KIT_NETWORK || 'base-sepolia'
});
// Add to your agent configuration
const agent = new AgentBuilder()
.withPlugin(agentKitPlugin)
.build();
ā Configuration
š§ Variable Name | š Description |
---|---|
CDP_API_KEY_NAME | Your CDP API key name for authentication š |
CDP_API_KEY_PRIVATE_KEY | Your private key for transactions š”ļø |
CDP_AGENT_KIT_NETWORK | Network to use (defaults to base-sepolia) š |
šÆ Actions
š¼ GET_WALLET_DETAILS
Retrieve information about the agent's wallet including address and balances.
š¬ Examples:
- "Can you show me my wallet details?"
- "What's my wallet address?"
- "Display my wallet information"
š¼ļø DEPLOY_NFT
Deploy a new NFT collection on the blockchain.
š¬ Examples:
- "Deploy a new NFT collection called 'Music NFTs' with symbol 'MUSIC'"
- "Create an NFT collection named 'Digital Art' with the symbol 'DART'"
š° DEPLOY_TOKEN
Deploy a new token on the blockchain.
š¬ Examples:
- "Deploy a new token called 'Artist Token' with symbol 'ART'"
- "Create a token with the name 'Community Points' and symbol 'CPS'"
šµ GET_BALANCE
Check token or NFT balance in the wallet.
š¬ Examples:
- "What's my current balance?"
- "Check my NFT balance for collection 0x1234..."
- "How many tokens do I have?"
šØ MINT_NFT
Mint new NFTs from an existing collection.
š¬ Examples:
- "Mint 5 NFTs from my 'Music NFTs' collection"
- "Create 3 new NFTs in my collection at 0x5678..."
š REGISTER_BASENAME
Register a basename for NFTs.
š¬ Examples:
- "Register 'myartcollection' as a basename for my NFTs"
- "Create a new basename 'digitalart' for my collection"
š° REQUEST_FAUCET_FUNDS
Request testnet funds for development and testing.
š¬ Examples:
- "Request testnet funds"
- "Get some test ETH for development"
š TRADE
Execute trades between tokens.
š¬ Examples:
- "Trade 10 DAI for ETH"
- "Swap 5 USDC for BTC"
āļø TRANSFER
Transfer tokens or NFTs to another address.
š¬ Examples:
- "Transfer 20 USDC to 0x1234..."
- "Send my NFT with ID #42 to 0x5678..."
š WOW_BUY_TOKEN
Buy WOW tokens.
š¬ Examples:
- "Buy 50 WOW tokens"
- "Purchase WOW tokens with 10 USDC"
š± WOW_SELL_TOKEN
Sell WOW tokens.
š¬ Examples:
- "Sell 30 WOW tokens"
- "Exchange my WOW tokens for USDC"
⨠WOW_CREATE_TOKEN
Create new WOW tokens.
š¬ Examples:
- "Create a new WOW token called 'Creator Coin' with symbol 'CC'"
- "Make a WOW token named 'Community Token'"
š Response Format
Responses from the plugin typically include:
- ā Status: Success or failure of the operation
- š Transaction Hash: When blockchain transactions are executed
- š² Asset Details: Information about tokens or NFTs
- š·ļø Collection Information: For NFT operations
- š Balances: Current wallet balances when requested
ā Error Handling
The plugin handles various error scenarios:
- šØ Authentication Errors: Issues with API keys or credentials
- š Network Issues: Problems connecting to the blockchain network
- šø Insufficient Funds: Not enough balance for transactions
- š Transaction Failures: When blockchain operations fail
- š« Invalid Parameters: When provided inputs are incorrect
š Network Support
The plugin supports the following networks:
- Base Sepolia (default)
- Base Mainnet
Configure the network using the CDP_AGENT_KIT_NETWORK
environment variable.
š§ Development
Build the plugin:
pnpm build
Run in development mode:
pnpm dev
š¦ Dependencies
- @elizaos/core
- @coinbase/cdp-agentkit-core
- @coinbase/cdp-langchain
- @langchain/core
š License
MIT