We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Build an AI Agent in Python

Build a tiny coding agent that can read files, edit code, run Python, and loop on feedback.

What you'll learn in this Python course

Write a toy agentic code editor in Python, similar to Claude Code or Cursor's Agent Mode. Understand how agents work from scratch by using free models on OpenRouter (via the OpenAI SDK) to create an LLM-powered code agent. You'll use function calling and feedback loops to build an agent that can find and fix bugs in a real project!

Chapter List

1
LLMs
Learn how LLMs work and send prompts to LLMs on OpenRouter using the OpenAI Python SDK
2
Functions
Write the functions your AI agent will need to modify files and run Python code
3
Function Calling
Give your AI agent the ability to call functions based on its system prompt and context window
4
Agents
Give your tool a proper feedback loop to make it truly "agentic" and fix a real bug

Join 17,934 students in the Build an AI Agent in Python course

Read reviews of their learning experiences

I find the idea of making an AI agent very cool. However to me, as someone who only knows programming stuff from this website, I feel like I did not really learn much here since 80% of what I did was copy something from the instructions. And a lot of stuff I had to do was with functions / methods that I haven't learned yet from any previous courses. This made it a bit frustrating but overall I still found it interesting.

(3/5)
Jan Galovits profile image

Jan Galovits

Austria

Good course for testing your mettle with real complex systems and today's tech.

(4/5)
Andrea Poletti profile image

Andrea Poletti

Italy

thing's are getting progressively harder ,yet more fun

(5/5)
Nihar Das profile image

Nihar Das

India

Cool project a bit challenging but you exposes you to a lot of new concepts

(4/5)
Chris  profile image

Chris

United States

The course was very good and hard at times what I think I am missing is a better understanding on how to actually progress if you want to focus more on LLMs, but I imagine this is not the scope of bootdev

(5/5)
Mauro Baldanzi profile image

Mauro Baldanzi

United Kingdom

really makes you appreciate the production quality agents that exist. trying to debug the code while also trying to debug the model's choices was pretty funny.

(5/5)
tanner  profile image

tanner

United States

Amazing course. Thank you very much to the creators :V

(5/5)
Joan Mosquera profile image

Joan Mosquera

Colombia

it was very enjoyable to make this project

(5/5)
Ayush Agarkar profile image

Ayush Agarkar

India

The course challenges your coding abilities while applying real life skills that other websites wouldn't usually give you.

(4/5)
Hamza Ali profile image

Hamza Ali

Canada

Showing 1-9 of 716

or view more reviews

Mediocrity doesn't cut it anymore

The only way to become a great developer is to write a lot of code

Avoid tutorial hell

by writing a ton of code

Stay motivated with

a game-like curriculum

Build portfolio projects

to prove your skills

Delve deeper

into foundational concepts

Learn flexibly online

without interrupting your life

For 1% the price of college

to minimize your financial risk

Frequently asked Questions

Got questions? We've got answers

Yes! It's free to create an account and start learning. You'll get all the immersive and interactive features for free for a few chapters. After that, if you still haven't paid for a membership, you'll be in read-only (content only) mode.