

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Build an AI Agent
incomplete
2: Python Setup
incomplete
3: OpenRouter API
incomplete
4: Token Metadata
incomplete
5: User Input
incomplete
6: Multiple Messages
incomplete
7: Verbose Output
incomplete
This lesson's interactive features are locked, please to keep using them
Let's set up a virtual environment for our project.
Virtual environments are Python's way to keep dependencies (e.g., the OpenAI library we're going to use) separate from other projects on our machine.
uv init --no-package your-project-name
cd your-project-name
uv venv
Make sure your virtual environment directory, usually .venv or venv, is added to your .gitignore file.
source .venv/bin/activate
You should see something like (your-project-name) in your terminal prompt; for example, mine is:
(aiagent) wagslane@MacBook-Pro-2 aiagent %
Always make sure your virtual environment is activated when running code or using the Boot.dev CLI in this course.
uv add openai==2.44.0
uv add python-dotenv==1.1.0
This tells Python that this project requires openai version 2.44.0 and python-dotenv version 1.1.0.
To run the project using the uv virtual environment, you can use the following command:
uv run main.py
In your terminal, you should see something like Hello from YOUR PROJECT NAME.
Submit the CLI tests while in your virtual environment.