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 an LLM-powered command-line program capable of reading, updating, and running Python code using the Gemini API. Learn how LLMs and agentic coding tools work.

What will you learn?

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 the Google Gemini API 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 the Gemini API using the Python client library
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 13,885 students in the Build an AI Agent in Python course

Read reviews of their learning experiences

This was a pretty good introduction to the AI agent workflow with Python

(4/5)
Shishir Bharadwaj profile image

Shishir Bharadwaj

United States

The scope of difficulty spikes here rather heavily. By this point you should know all the basics, but due to how the lesson is made, I have slight issues with terms we've never addressed. If your going into this lesson, take it slow, rely on boots and the rest will fall into place. While they do a lot to explain the lesson, I noticed it felt rushed. Assuming they fix that and implement some more guidance, this lesson would be perfect.

(5/5)
FYI MyPawn profile image

FYI MyPawn

Canada

Made me grow and really challenged me to apply all the basics in Python, Linux, and Git. Pushed me to a new level!

(5/5)
Bradley Williams profile image

Bradley Williams

United States

Good to learn how to call an llm api and deal with responses

(5/5)
Manuel Feurstein profile image

Manuel Feurstein

Austria

very impressive

(5/5)
Alexander Serra profile image

Alexander Serra

Italy

Awesome stuff, I learned a lot and had fun

(5/5)
Cole Gibbs profile image

Cole Gibbs

Houston, TX

This was an excellent module, it would be nice to redo it.

(5/5)
Anthony Odukoya profile image

Anthony Odukoya

United Kingdom

AI is a hot topic right now and learning the basic of creating an AI agent with python is a fantastic idea.

(5/5)
Chris Roze profile image

Chris Roze

Paris, France

to the public =D great job, keep going. GaNBaTe

(5/5)
Zane Aston profile image

Zane Aston

United States

Showing 1-9 of 502

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.