This example demonstrates an agent setup as a terminal style chatbot with access to the full set of AgentKit actions. A CDP Smart Wallet will be created and owned by the signer passed into the example.
- "Transfer a portion of your ETH to a random address"
- "Use the faucet"
- "What is the price of BTC?"
- Python 3.10+
- uv for package management and tooling
- CDP API Key
- OpenAI API Key
Before using the example, ensure that you have the correct version of Python installed. The example requires Python 3.10 or higher. You can check your Python version by running:
python --version
uv --versionuv installYou'll need the following API keys:
Once you have them, rename the .env.local file to .env and make sure you set the API keys to their corresponding environment variables:
CDP_API_KEY_ID=CDP_API_KEY_SECRET=OPENAI_API_KEY=
PRIVATE_KEY=(if not provided, a new key will be generated)NETWORK_ID=(defaults to base-sepolia if not set)
uv run chatbot.py