Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.62 KB

File metadata and controls

51 lines (38 loc) · 1.62 KB

AgentKit CDP Smart Wallet Example - Chatbot Python

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.

Ask the chatbot to engage in the Web3 ecosystem!

  • "Transfer a portion of your ETH to a random address"
  • "Use the faucet"
  • "What is the price of BTC?"

Requirements

Checking Python Version

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 --version

Installation

uv install

Run the Chatbot

Set ENV Vars

You'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:

Required:

  • CDP_API_KEY_ID=
  • CDP_API_KEY_SECRET=
  • OPENAI_API_KEY=

Optional:

  • PRIVATE_KEY= (if not provided, a new key will be generated)
  • NETWORK_ID= (defaults to base-sepolia if not set)
uv run chatbot.py