AG2 Workshop: Building Multi-Agent Systems
A hands-on workshop teaching you to build, orchestrate, test, and deploy multi-agent AI systems using AG2.
23 episodes covering fundamentals through production deployment. Designed for YouTube (3-4 min per episode) and university programs (5 lectures).
Prerequisites
- Python 3.12+ recommended (3.12+ required for Episode 15 MCP)
- Basic Python proficiency
- An OpenAI API key (get one here)
- Estimated API cost for all 23 episodes: $3-5 (using gpt-4o-mini)
Getting Started
# Clone the repository
git clone https://github.com/ag2ai/build-with-ag2.git
cd build-with-ag2/ag2-workshop
# Set up your environment
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY
# Install dependencies
pip install -r requirements.txt
# Start with Episode 1
jupyter notebook episodes/ep01_why_agents.ipynb
Note: The .env file lives in ag2-workshop/ (one level above episodes/). Python-dotenv searches parent directories automatically, so load_dotenv() in notebooks will find it.
Episodes
Basics (Episodes 1-4)
Patterns (Episodes 5-9)
Applications (Episodes 10-15)
Production (Episodes 16-20)
Specialized Patterns (Episodes 21-22)
Closing
| # |
Title |
What You Learn |
| 23 |
What’s Next |
AG2 Beta, ecosystem, future directions |
Notebook Structure
Each episode notebook has two sections:
- Core content — Essential concepts + one hands-on build. This is what YouTube episodes cover.
- Additional content — Deeper dives, alternative approaches, design rationale. For university lectures and self-study.
For Instructors
This workshop maps to 5 university lectures:
| Lecture |
Episodes |
Focus |
| 1. Foundations |
1-4 |
Agent basics, tools, two-agent systems |
| 2. Orchestration |
5-9 |
Patterns, handoffs, decision framework |
| 3. Applications |
10-15 |
Real apps, RAG, web, UI, MCP |
| 4. Production |
16-20 |
Observability, security, testing, costs, deployment |
| 5. Advanced |
21-23 |
Specialized patterns, reasoning, future |
Troubleshooting
See episodes/troubleshooting.md for common issues and fixes.
Resources