

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
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
Time for Boot.dev to cash in on the AI hype.
If you've ever used OpenCode, Cursor, or Claude Code as an "agentic" AI tool, you'll understand what we're building in this project.
We're building a toy version of Claude Code! We'll power it with free models from OpenRouter, accessed through the official OpenAI Python SDK. As long as you have an LLM at your disposal, it's actually surprisingly simple to build a (somewhat) effective custom agent.
OpenRouter gives us a single API (compatible with the OpenAI SDK) for hundreds of models, including a rotating set of free ones. We'll use the special openrouter/free model, which automatically routes each request to an available free model that supports the features we need (like tool calling).
The free tier is enough to finish this course, but it's rate-limited (roughly 50 requests per day). If you'd like a smoother experience, adding $10 of credit to your OpenRouter account (a one-time top-up) raises that limit to roughly 1,000 requests per day. Staying on the free tier costs nothing β the $10 is purely for convenience.
We'll keep updating this course as the situation with free tiers and model quality evolves!
If you try to complete this course without WSL 2 installed on Windows, you're gonna have a bad time.
The program we're building is a CLI tool that:
Accepts a coding task (e.g., "strings aren't splitting in my app, pweeze fix π₯Ίππ½ππ½")
Chooses from a set of predefined functions to work on the task, for example:
Scan the files in a directory
Read a file's contents
Overwrite a file's contents
Execute the Python interpreter on a file
Repeats step 2 until the task is complete (or it fails miserably, which is possible)
For example, I have a buggy calculator app, so I used my agent to fix the code:
> uv run main.py "fix my calculator app, it's not starting correctly"
# Calling function: get_files_info
# Calling function: get_file_content
# Calling function: write_file
# Calling function: run_python_file
# Calling function: write_file
# Calling function: run_python_file
# Final response:
# Great! The calculator app now seems to be working correctly. The output shows the expression and the result in a formatted way.Python 3.10+ installed (see the bookbot project for help if you don't already have it)
The uv project/package manager (installation docs)
Access to a Unix-like shell (e.g. zsh or bash)
The learning goals of this project are as follows:
Get an introduction to multi-directory Python projects.
Understand how the AI tools that you'll almost certainly use on the job actually work under the hood.
Practice your Python and functional programming skills.
The goal is not to build an LLM from scratch, but instead to use a pre-trained LLM to build an agent from scratch.
To get started, make sure you have Python and the Boot.dev CLI installed and working.
OpenRouter is an external web service, and it may rate limit your project (especially on the free tier).
Submit the CLI tests.