Skip to content

emingenc/agent-mastery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– AI Agent Mastery

AI Agent Mastery LangChain LangGraph Python

Master AI Agent Development from Zero to Production

A structured, hands-on curriculum for building real-world AI agents

Get Started โ€ข Curriculum โ€ข Status Board โ€ข Resources


๐ŸŽฏ Why This Repository?

The Problem: AI agent tutorials are scattered, outdated, or too theoretical. Most developers struggle to go from "hello world" to production-ready agents.

The Solution: A complete, structured learning path that takes you from basic chatbots to sophisticated multi-agent systems โ€” with real-world projects, not toy examples.

What Makes This Different

Traditional Tutorials This Curriculum
โŒ Copy-paste code without understanding โœ… Build intuition through progression
โŒ Outdated API patterns โœ… Latest LangChain/LangGraph (2024+)
โŒ Toy examples ("count to 10") โœ… Real problems (support bots, research assistants)
โŒ Skip error handling โœ… Production-ready patterns
โŒ No clear path โœ… 33 structured tasks, 6 levels

๐Ÿ—๏ธ What You'll Build

Level 1: Foundation Agents
โ”œโ”€โ”€ CLI Chatbot
โ”œโ”€โ”€ Unit Converter with Tools
โ”œโ”€โ”€ Task Manager (stateful)
โ”œโ”€โ”€ Persistent Notes (SQLite memory)
โ”œโ”€โ”€ Code Reviewer (structured output)
โ””โ”€โ”€ Standup Bot (multi-turn)

Level 2: Reasoning Patterns  
โ”œโ”€โ”€ Math Solver (Chain-of-Thought)
โ”œโ”€โ”€ Essay Improver (Self-Reflection)
โ”œโ”€โ”€ Trip Planner (Plan-and-Execute)
โ”œโ”€โ”€ Debate Simulator (Self-Consistency)
โ”œโ”€โ”€ Bug Hunter (ReAct)
โ””โ”€โ”€ Recipe Adapter (Few-Shot)

Level 3: RAG & Knowledge
โ”œโ”€โ”€ Docs Q&A Bot (Basic RAG)
โ”œโ”€โ”€ Research Assistant (Agentic RAG)
โ”œโ”€โ”€ Multi-Source Analyst
โ”œโ”€โ”€ Self-Correcting Q&A (Self-RAG)
โ””โ”€โ”€ Fallback Search (Corrective RAG)

Level 4: Multi-Agent Systems
โ”œโ”€โ”€ Blog Pipeline (Sequential)
โ”œโ”€โ”€ Support Router (Conditional)
โ”œโ”€โ”€ Fact Checker (Parallel)
โ”œโ”€โ”€ Project Manager (Supervisor)
โ”œโ”€โ”€ Devil's Advocate (Adversarial)
โ””โ”€โ”€ Startup Team (Role-based)

Level 5: Production Ready
โ”œโ”€โ”€ Approval Workflow (HITL)
โ”œโ”€โ”€ Resilient Agent (Error Handling)
โ”œโ”€โ”€ Streaming Chat
โ”œโ”€โ”€ Budget-Aware Agent
โ”œโ”€โ”€ Persistent Workflows
โ””โ”€โ”€ Observable Agent (Monitoring)

Level 6: Mastery Capstones
โ”œโ”€โ”€ Full-Stack Agent System
โ”œโ”€โ”€ Pattern Decision Guide
โ”œโ”€โ”€ Teach It Back
โ””โ”€โ”€ Novel Pattern Innovation

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.12+
  • OpenAI API key (or compatible LLM)
  • Basic Python knowledge

Setup

# Clone the repository
git clone https://github.com/yourusername/ai-agent-mastery.git
cd ai-agent-mastery

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

Track Your Progress

Option 1: CLI Tracker (Recommended)

python tracker.py              # Show dashboard
python tracker.py complete 1   # Mark issue #001 as done
python tracker.py next         # Show next task details
python tracker.py reset        # Reset all progress

Option 2: Web Dashboard (Gradio)

python dashboard.py            # Opens http://localhost:7860

Your First Agent

  1. Run python tracker.py to see your first task
  2. Open AGENT_MASTERY_CHECKLIST.md for the ISSUE-001 spec
  3. Create agents/level_1/01_hello_agent.py
  4. Run python tracker.py complete 1 when done!

๐Ÿ“š Curriculum Overview

๐Ÿฅ‰ Level 1: Foundations (1,100 XP)

Learn the core building blocks

  • Agent invocation patterns
  • Creating and using tools (@tool decorator)
  • Memory and state management
  • Structured output with Pydantic
  • Multi-turn conversations

๐Ÿฅˆ Level 2: Advanced Reasoning (1,800 XP)

Master prompt engineering strategies

  • Chain-of-Thought (step-by-step reasoning)
  • Self-Reflection (critique and improve)
  • Plan-and-Execute (user approval workflows)
  • ReAct (Thought โ†’ Action โ†’ Observation)
  • Few-Shot learning (example-based)

๐Ÿฅ‡ Level 3: RAG & Knowledge (2,350 XP)

Build knowledge-augmented agents

  • Vector stores and embeddings
  • Chunking strategies
  • Retrieval patterns (similarity, hybrid, MMR)
  • Reranking for precision
  • Self-RAG and Corrective RAG

๐Ÿ’Ž Level 4: Multi-Agent Systems (3,100 XP)

Coordinate multiple agents

  • Sequential pipelines
  • Conditional routing
  • Parallel execution
  • Supervisor patterns
  • Adversarial collaboration

๐Ÿ’Ž Level 5: Production Ready (3,100 XP)

Ship agents to production

  • Human-in-the-loop approval
  • Error handling and resilience
  • Streaming responses
  • Cost management
  • Observability and monitoring

๐Ÿ‘‘ Level 6: Mastery (2,500 XP)

Prove your expertise

  • Combine 5+ patterns
  • Create decision guides
  • Teach others
  • Innovate new patterns

๐Ÿ“ Repository Structure

ai-agent-mastery/
โ”‚
โ”œโ”€โ”€ ๐ŸŽฎ tracker.py             # CLI progress tracker (run this!)
โ”œโ”€โ”€ ๐ŸŒ dashboard.py           # Web dashboard (Gradio)
โ”œโ”€โ”€ ๐Ÿ“Š progress.json          # Your progress data (auto-managed)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‹ STATUS.md              # Manual progress view (optional)
โ”œโ”€โ”€ ๐Ÿ“– AGENT_MASTERY_CHECKLIST.md  # Full curriculum + reference guides
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ tasks/                 # Detailed task specifications
โ”‚   โ”œโ”€โ”€ level_1/             # Each task = one file with full spec
โ”‚   โ”œโ”€โ”€ level_2/
โ”‚   โ”œโ”€โ”€ level_3/
โ”‚   โ”œโ”€โ”€ level_4/
โ”‚   โ”œโ”€โ”€ level_5/
โ”‚   โ””โ”€โ”€ level_6/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ agents/                # Your implementations go here
โ”‚   โ”œโ”€โ”€ level_1/
โ”‚   โ”œโ”€โ”€ level_2/
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ .github/               # โš ๏ธ IMPORTANT: Coding rules & instructions
โ”‚   โ”œโ”€โ”€ instructions/
โ”‚   โ”‚   โ”œโ”€โ”€ python.instructions.md
โ”‚   โ”‚   โ””โ”€โ”€ tests.instructions.md
โ”‚   โ””โ”€โ”€ coding-rules-compact.md
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ tests/                 # Test your implementations
โ””โ”€โ”€ ๐Ÿ“ utils/                 # Shared utilities

โš ๏ธ Important: Instruction Files

These files define coding standards for AI-assisted development

Why Instructions Matter

When using AI coding assistants (GitHub Copilot, Claude, Cursor), instruction files ensure:

  1. Consistent Code Style - All code follows the same patterns
  2. Best Practices - Type hints, docstrings, error handling
  3. Project-Specific Rules - LangChain patterns, testing standards
  4. Quality Gates - AI won't generate subpar code

Key Instruction Files

File Purpose
.github/instructions/python.instructions.md Python coding standards, type hints, docstrings
.github/instructions/tests.instructions.md Testing patterns, pytest conventions
.github/coding-rules-compact.md Quick reference for all coding rules

How They Work

You write: "Create a tool that converts temperatures"

Without instructions:
def convert(t):
    return t * 9/5 + 32  # No types, no docs, no error handling

With instructions:
@tool
def convert_temperature(
    value: float,
    from_unit: Literal["celsius", "fahrenheit"],
    to_unit: Literal["celsius", "fahrenheit"]
) -> str:
    """
    Convert temperature between Celsius and Fahrenheit.
    
    Args:
        value: The temperature value to convert
        from_unit: Source unit ('celsius' or 'fahrenheit')
        to_unit: Target unit ('celsius' or 'fahrenheit')
    
    Returns:
        Formatted string with conversion result
    
    Raises:
        ValueError: If units are invalid or the same
    """
    ...

๐Ÿ“Š Progress Tracking

Gamified Learning

Rank XP Required Level
๐Ÿฅ‰ Bronze 0 - 2,000 1-2
๐Ÿฅˆ Silver 2,000 - 5,000 2-3
๐Ÿฅ‡ Gold 5,000 - 8,000 3-4
๐Ÿ’Ž Diamond 8,000 - 12,000 4-5
๐Ÿ‘‘ Master 12,000+ 6

Dynamic Tracker

CLI (Beautiful terminal UI):

python tracker.py
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿค– AI AGENT MASTERY         โ”‚
โ”‚ 0 / 13,950 XP  โ€ข  ๐Ÿฅ‰ Bronze โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Level                  โ”‚ Progress                       โ”‚ Tasks โ”‚ XP โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”ค
โ”‚ L1 Foundations         โ”‚ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘           โ”‚  0/6  โ”‚  0 โ”‚
โ”‚ L2 Advanced Reasoning  โ”‚ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘           โ”‚  0/6  โ”‚  0 โ”‚
...
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ•ฏ

Web Dashboard (Gradio):

python dashboard.py   # Opens http://localhost:7860

Commands

python tracker.py              # Show dashboard
python tracker.py complete 1   # Mark #001 complete โ†’ +100 XP
python tracker.py complete 2   # Mark #002 complete โ†’ +150 XP
python tracker.py next         # Show next task details
python tracker.py reset        # Start over

๐Ÿ“š Reference Guides

The AGENT_MASTERY_CHECKLIST.md includes comprehensive reference sections:

๐ŸŽฏ Prompt Engineering Strategies

  • When to use Zero-Shot vs Few-Shot
  • Chain-of-Thought patterns
  • Self-Consistency techniques
  • ReAct implementation
  • Anti-patterns to avoid

๐Ÿ“š RAG Strategies

  • Chunking strategies (fixed, semantic, parent-child)
  • Embedding model comparison
  • Vector store selection guide
  • Retrieval patterns (similarity, hybrid, MMR)
  • Reranking decision matrix
  • RAG architecture patterns (Naive, Agentic, Self, Corrective)

๐Ÿ› ๏ธ Tech Stack

Component Technology
LLM Framework LangChain 0.2+
Agent Framework LangGraph
Vector Store Chroma (dev), Pinecone (prod)
Embeddings OpenAI, or open-source alternatives
Memory SQLite (dev), PostgreSQL (prod)
Monitoring LangSmith
Testing pytest

๐Ÿค Contributing

Contributions welcome! Please:

  1. Follow the coding standards in .github/instructions/
  2. Add tests for new features
  3. Update documentation
  4. Submit a PR with clear description

๐Ÿ“– Resources

Official Documentation

Papers & Research

Community


๐Ÿ“œ License

MIT License - feel free to use this curriculum for learning, teaching, or building products.


Ready to become an AI Agent Master?

๐Ÿ“‹ Check Your Status โ†’ ๐ŸŽฏ Start Task 002


Built with โค๏ธ for the AI developer community

About

Master AI Agent Development from Zero to Production

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages