Post Content
Build your own functional AI coding agent from the ground up using Python and the free Gemini Flash API. This project-based tutorial provides a deep understanding of how powerful AI tools work by guiding you through the creation of an agentic loop powered by tool calling. You will implement the core abilities for your agent to interact with and modify a codebase, including reading files, writing to files, and executing code to get feedback.
Lane Wagner created this course.
Check out the interactive version of the course on boot.dev: https://www.boot.dev/courses/build-ai-agent-python
❤️ Support for this channel comes from our friends at Scrimba – the coding platform that’s reinvented interactive learning: https://scrimba.com/freecodecamp
⭐️ Contents ⭐️
– 00:00:00 Introduction
– 00:01:14 Why Build an AI Agent?
– 00:01:49 Course Overview & What We’re Building
– 00:02:25 How to Follow Along
– 00:03:47 What is an AI Agent? (Agentic Loops & Tool Calling)
– 00:06:03 The Agent’s Four Tools
– 00:07:58 Prerequisites & Project Goals
– 00:10:08 Demo: Agentic vs. One-Shot Responses
– 00:13:07 Python Project Setup with UV
– 00:15:44 Getting Started with the Gemini API
– 00:19:21 Making Your First API Call
– 00:24:44 Accepting Command-Line Arguments
– 00:27:46 Managing Conversation History
– 00:30:39 Adding a Verbose Flag for Debugging
– 00:33:35 Setting Up the Project for Our Agent (Calculator App)
– 00:36:23 Building Tool #1: Get Files Info
– 00:49:39 Building Tool #2: Get File Content
– 00:58:24 Building Tool #3: Write File
– 01:05:26 Security Note: Dangers of Running AI-Generated Code
– 01:07:30 Building Tool #4: Run Python File
– 01:18:00 Understanding the System Prompt
– 01:33:10 How Tool Calling Works: Declaring Functions for the LLM
– 01:41:38 Adding All Function Declarations
– 01:49:19 Implementing the Function Calling Logic
– 01:57:30 Creating the Agentic Loop
– 02:07:11 Final Demo: Agent Fixes a Bug Autonomously
– 02:13:44 Conclusion & Next Steps
🎉 Thanks to our Champion and Sponsor supporters:
👾 Drake Milly
👾 Ulises Moralez
👾 Goddard Tan
👾 David MG
👾 Matthew Springman
👾 Claudio
👾 Oscar R.
👾 jedi-or-sith
👾 Nattira Maneerat
👾 Justin Hual
—
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://freecodecamp.org/news Read More freeCodeCamp.org
#programming #freecodecamp #learn #learncode #learncoding