Build Your First AI Agent in Python (Step by Step)
Jun 17, 2026•Channel
AI Analysis
Data from YouTube Data API v3•Updated Just now
Video Overview
Video Details
Published1 month ago
Duration12:19
Video IDYKPO2S6j7MM
Languageen
CategoryScience & Technology
PrivacyPublic
Made for KidsNo
Video TypeRegular Video
Performance Metrics
Views13.6K
Likes277
Comments13
Engagement Rate2.13%
Likes per 100 views2.04
Comments per 1K views0.96
Video Tags
#kevin stratvert#ai agent python#build ai agent python#ai agent python tutorial#how to build an ai agent#build your first ai agent#ai agent from scratch#ai agent tutorial for beginners#ai agents for beginners#python ai agent#agentspan#agentspan tutorial#llm agent python#ai agent with tools#build ai agent in python 2026#ai agents#agentic ai#python tutorial#python for beginners#artificial intelligence
Description
This beginner-friendly tutorial walks you through how to build your first AI agent in Python from scratch, step by step, with no prior experience required.
🤖 Install Agentspan in seconds: pip install agentspan or npm install @agentspan-ai/sdk
First, you'll set up everything you need to follow along, including Python, the Java Development Kit (JDK), and the uv package manager, then install the free and open-source Agentspan framework with a single command.
Next, you'll build your first AI agent in Python using just three simple building blocks: a tool the agent can call, the agent itself, and a single line of code that runs it.
Then, you'll open the Agentspan dashboard and watch every step your agent takes, including the exact inputs and outputs of each tool call, so you can see exactly what your AI agent is doing.
Afterward, you'll build a more capable agent that reads a Python file and writes its own pytest tests for each function, saving its progress one step at a time.
Along the way, you'll learn why your agent's state lives on a server instead of inside your Python script, the design choice behind everything that follows.
Then, you'll crash your agent on purpose by killing the Python process in the middle of a run, and watch it resume exactly where it left off when you start it back up.
Finally, you'll learn how to make your agent idempotent so it can survive reruns.
Start building with Agentspan ➜ pip install agentspan
Host: David DeWinter
Sponsor: Agentspan
📚 RESOURCES
Resource Guide (commands & code) ➜ https://docs.google.com/document/d/1vx9qDblLCNyRp7z-M4H6_ICnaSlOcto4Ep4DvyfAFmQ/edit
Agentspan ➜ https://agentspan.ai/
Agentspan Docs ➜ https://github.com/agentspan-ai/agentspan
Python ➜ https://www.python.org/downloads/
Java JDK (Adoptium Temurin) ➜ https://adoptium.net/temurin/releases
uv (Python package manager) ➜ https://docs.astral.sh/uv/
OpenAI API Keys ➜ https://platform.openai.com/api-keys
Anthropic API Keys ➜ https://platform.claude.com/
⌚ TIMESTAMPS
0:00 - What You'll Build
0:23 - Install Prerequisites
1:46 - VS Code Setup
2:33 - API Keys & Providers
3:22 - Tool, Agent & Run
5:30 - Start the Server
6:07 - Agentspan Dashboard
6:58 - Test-Writing Agent
9:12 - Crash & Resume
12:02 - Next Steps
📩 NEWSLETTER
Get the latest high-quality tutorials and tips and tricks videos emailed to your inbox each week: https://kevinstratvert.com/newsletter
🔽 CONNECT WITH ME
Official website: http://www.kevinstratvert.com
LinkedIn: / kevinstratvert
Discord: https://bit.ly/KevinStratvertDiscord
Twitter: / kevstrat
Facebook: / kevin-stratvert-101912218227818
TikTok: / kevinstratvert
Instagram: / kevinstratvert
🎁 PARTNERS & DISCOUNTED OFFERS
💻 Hostinger | https://hostinger.kevinstratvert.com
📋 Notion | https://notion.kevinstratvert.com
💵 Quickbooks Online | https://qbo.kevinstratvert.com
🎙️ Voicemod AI Voice Changer | https://voicemod.kevinstratvert.com
🕵️ VidIQ | https://vidiq.kevinstratvert.com
🎒 MY COURSES
Go from Excel novice to data analysis ninja in just 2 hours: https://kevinstratvert.thinkific.com
🎓TRAINING
Take your skills, or your team’s, to the next level by partnering with us for expert training: https://kevinstratvert.com/training
🙏 REQUEST VIDEOS
https://forms.gle/BDrTNUoxheEoMLGt5
🔔 SUBSCRIBE ON YOUTUBE
https://www.youtube.com/user/kevlers?...
🙌 SUPPORT THE CHANNEL
Hit the THANKS button in any video!
Amazon affiliate link: https://amzn.to/3kCP2yz
⚖ DISCLOSURE
Some links are affiliate links. Purchasing through these links gives me a small commission to support videos on this channel. The price to you is the same.