H
HiPath AI
All roadmaps
Beginner · 26 phases · 182 lessons · Free

AI Agent Developer with Python: From Foundations to Autonomous Systems

A hands-on, project-based roadmap taking you from Python basics to building production-ready autonomous AI agents, with each phase delivering a working artifact that the next phase extends.

Start This Roadmap Free →

Phase 1: Python Core Syntax and Data

  1. Python Execution Model and REPL

    Explain how Python source code is compiled to bytecode and executed by the interpreter, and demonstrate running scripts and interactive sessions from the command line.

  2. Variables

    Implement variable assignment following PEP 8 naming rules, and explain how Python's object-reference model affects mutability and aliasing.

  3. Core Data Types

    Compare the behavior of int, float, complex, str, and bool types, and implement type conversions and formatted string output for agent logging.

  4. Collection Types

    Design appropriate collection choices for agent state storage by implementing CRUD operations on lists, tuples, sets, and dictionaries with performance trade-off analysis.

  5. Control Flow

    Implement decision-making logic for agent workflows using if/elif/else, for/while loops, and list/dict/set comprehensions with proper loop control statements.

  6. Functions

    Design reusable agent utilities by implementing functions with default arguments, *args/**kwargs, type hints, and closures, while explaining LEGB scope resolution.

  7. Capstone

    Implement a working AgentStateManager class that stores conversation history in typed collections, provides CRUD methods with comprehensions, uses functions for state transitions, and passes acceptance checks: handles 10

Phase 2: Object-Oriented Programming and Design Patterns

  1. Designing Python Classes with Encapsulation

    Implement a Python class using private attributes, property decorators, and type hints to enforce encapsulation and enable static analysis for an AI agent configuration object.

  2. Modeling Agent Behaviors with Inheritance

    Design a class hierarchy for AI agent behaviors using abstract base classes and inheritance to define a common interface for different agent types.

  3. Composing Agent Capabilities with Mixins

    Implement reusable agent capabilities (e.g., logging, caching, tool use) using mixin classes and composition to avoid deep inheritance hierarchies.

  4. Applying the Strategy Pattern for

    Implement the Strategy pattern to enable runtime swapping of LLM providers (e.g., OpenAI, Anthropic, local models) behind a unified interface for an AI agent.

  5. Implementing the Observer Pattern for

    Implement the Observer pattern to allow multiple subscribers (e.g., UI, logger, monitor) to react to agent lifecycle events (start, tool_call, finish) in real time.

  6. Building a Tool Registry with

    Construct a tool registry using the Factory and Registry patterns to dynamically discover, instantiate, and manage tools available to an AI agent by name.

  7. Capstone

    Assemble a working AI agent framework core integrating encapsulation, inheritance, Strategy, Observer, and Factory patterns that can execute a multi-step task with pluggable LLM, tools, and event listeners; success crite

Phase 3: Asynchronous Programming with asyncio

  1. Async Fundamentals

    Explain the asyncio event loop architecture and write basic coroutines using async/await syntax

  2. Running Concurrent Tasks with asyncio.gather

    Implement concurrent execution of multiple coroutines using asyncio.gather and handle returned results

  3. Async HTTP Requests with aiohttp

    Implement asynchronous HTTP requests using aiohttp ClientSession for non-blocking API calls

  4. Controlling Concurrency with Semaphores

    Implement rate limiting and concurrency control using asyncio.Semaphore for API quota management

  5. Error Handling and Retry Logic

    Design robust async error handling with exponential backoff retry logic using asyncio.sleep

  6. Async Context Managers for Resource

    Implement async context managers using __aenter__ and __aexit__ for proper resource cleanup in agents

  7. Capstone

    Build a production-ready async API client class with connection pooling, rate limiting, retry logic, and context manager support that successfully completes 100 concurrent requests to a test endpoint with zero resource l

Phase 4: Environment Management and Dependency Isolation

  1. Python Virtual Environments

    Create and activate isolated Python virtual environments using venv to prevent dependency conflicts across AI agent projects.

  2. Dependency Declaration with requirements.txt and

    Declare project dependencies in requirements.txt and pyproject.toml formats to enable reproducible environment setup for AI agent development.

  3. Package Installation and Version Pinning

    Install packages via pip with version pinning and constraint files to ensure deterministic builds for AI agent components.

  4. Managing Multiple Python Versions with

    Install and switch between Python versions using pyenv to support compatibility testing across AI agent frameworks.

  5. Dependency Resolution and Conflict Debugging

    Diagnose and resolve dependency conflicts using pip-tools and pipdeptree to maintain stable AI agent development environments.

  6. Containerizing Development Environments with Docker

    Create Dockerfiles and docker-compose configurations to containerize AI agent development environments with pinned dependencies.

  7. Capstone

    Build a complete, version-controlled development environment specification including virtual environment setup, pinned dependencies, Python version constraint, and Docker configuration that successfully runs a starter AI

Phase 5: Testing

  1. Unit Testing AI Agent Components

    Implement unit tests for individual agent functions using Pytest to verify isolated behavior and handle edge cases.

  2. Mocking LLM Calls and External

    Design test doubles for LLM providers and external tools to create deterministic, fast-running test suites without network dependencies.

  3. Integration Testing Multi-Step Agent Workflows

    Construct integration tests that validate end-to-end agent execution paths including tool chaining, memory updates, and error recovery.

  4. Property-Based Testing for Agent Input

    Apply property-based testing with Hypothesis to discover edge-case failures in agent input parsing and parameter validation logic.

  5. Testing Agent Resilience with Chaos

    Implement fault injection tests that simulate LLM timeouts, tool failures, and rate limits to verify agent graceful degradation.

  6. Benchmarking Agent Performance and Token

    Create automated benchmarks measuring agent latency, token consumption, and success rates across test scenarios to establish performance baselines.

  7. Capstone

    Deliver a complete, CI-integrated test suite for a multi-tool AI agent achieving 90%+ code coverage, sub-5-minute execution time, and documented acceptance criteria for all critical user journeys.

Phase 6: HTTP Clients and REST API

  1. Understanding HTTP Fundamentals for API

    Explain the structure of HTTP requests and responses including methods, headers, status codes, and body content as they apply to REST API interactions.

  2. Making HTTP Requests with the

    Implement GET, POST, PUT, and DELETE requests using the Python Requests library to interact with a public REST API.

  3. Handling Authentication and Authorization in

    Implement API key, Bearer token, and Basic Auth authentication methods in HTTP requests to access protected endpoints.

  4. Processing API Responses and Handling

    Design robust error handling for HTTP status codes, network timeouts, rate limits, and malformed JSON responses in API client code.

  5. Building a Reusable REST API

    Implement a configurable, reusable Python class that encapsulates base URL, authentication, request methods, and error handling for a target REST API.

  6. Consuming Paginated and Filtered API

    Implement logic to traverse paginated API responses and apply query parameters for filtering, sorting, and searching data.

  7. Capstone

    Design and implement an AI agent that uses the GitHub REST API to fetch repository metadata, contributor stats, and commit history, then generates a markdown summary report with measurable acceptance criteria: successful

Phase 7: Building REST APIs with FastAPI

  1. FastAPI Project Structure and Dependency

    Implement a modular FastAPI project structure using APIRouter and dependency injection for database sessions and configuration management

  2. RESTful Endpoint Design with Path

    Design RESTful CRUD endpoints using FastAPI path operations with proper HTTP methods, status codes, and Pydantic request/response models

  3. Advanced Query Parameters

    Implement flexible querying with pagination, sorting, and filtering capabilities for AI agent metadata using FastAPI query parameters and Pydantic models

  4. Authentication and Authorization with JWT

    Implement secure authentication using JWT tokens and OAuth2 password flow with role-based access control for AI agent management endpoints

  5. API Documentation

    Configure automatic OpenAPI documentation, write integration tests using FastAPI TestClient, and implement global exception handlers for consistent error responses

  6. WebSocket Integration for Real-Time Agent

    Implement WebSocket endpoints for real-time AI agent status updates and command streaming with connection lifecycle management

  7. Capstone

    Build a complete, tested, and documented FastAPI application for managing AI agents with CRUD operations, JWT authentication, real-time WebSocket updates, pagination, and comprehensive error handling — acceptance criteri

Phase 8: Data Validation and Serialization with

  1. Defining Data Contracts with Pydantic

    Define Pydantic models with field types, constraints, and custom validators to represent agent input and output schemas.

  2. Validating Incoming Agent Requests

    Implement request validation logic that rejects malformed payloads and returns structured error details for agent endpoints.

  3. Serializing Agent Responses to JSON

    Configure Pydantic serialization to produce JSON and MessagePack output with controlled field inclusion and naming conventions.

  4. Handling Nested and Recursive Data

    Model and validate nested Pydantic models including recursive types for multi-step agent reasoning traces.

  5. Versioning Data Schemas for Backward

    Implement schema versioning using Pydantic discriminated unions and migration functions to evolve agent contracts without breaking clients.

  6. Optimizing Validation Performance for High-Throughput

    Apply model compilation, field caching, and lazy validation techniques to reduce serialization overhead in production agent pipelines.

  7. Capstone

    Deliver a reusable Python package that validates incoming tool calls, serializes structured responses in JSON and MessagePack, supports schema versioning, and passes load tests at 1,000 requests/second with <5ms p99 late

Phase 9: Database Integration with SQLAlchemy and

  1. Configure SQLAlchemy Engine and Session

    Configure a SQLAlchemy engine with connection pooling and implement scoped session management suitable for concurrent AI agent operations.

  2. Define Declarative ORM Models for

    Define SQLAlchemy declarative ORM models representing AI agent state, conversation history, and tool usage logs with appropriate data types and constraints.

  3. Implement Database Migrations with Alembic

    Initialize Alembic, generate migration scripts for schema changes, and apply migrations to upgrade/downgrade the AI agent database schema.

  4. Build Repository Classes for Encapsulating

    Implement repository pattern classes that encapsulate CRUD operations and complex queries for agent state, conversations, and tool logs, promoting separation of concerns.

  5. Optimize Database Queries for High-Frequency

    Apply SQLAlchemy query optimization techniques including eager loading, indexing strategies, and query profiling to minimize latency in agent state retrieval.

  6. Implement Transaction Management and Concurrency

    Implement database transaction management with isolation levels and optimistic locking to handle concurrent updates in multi-agent workflow scenarios.

  7. Capstone

    Integrate all database components to build a persistent memory layer artifact enabling an AI agent to store/retrieve state, conversation history, and tool logs across restarts, verified by successful state recovery after

Phase 10: Vector Databases and Embedding Storage

  1. Vector Database Fundamentals for AI

    Explain the core concepts of vector databases, embeddings, and similarity search in the context of AI agent memory systems.

  2. Setting Up ChromaDB for Local

    Install and configure ChromaDB locally with persistent storage for AI agent memory persistence.

  3. Storing and Retrieving Agent Memories

    Implement embedding generation and storage workflows for conversational context and task history in an AI agent.

  4. Optimizing Similarity Search with Metadata

    Design and implement metadata-based filtering strategies to improve retrieval relevance for multi-tenant agent scenarios.

  5. Implementing Hybrid Search for Agent

    Build a hybrid search pipeline combining vector similarity and keyword matching for robust agent knowledge access.

  6. Managing Embedding Lifecycle

    Implement embedding versioning, update strategies, and automated cleanup policies for long-running agent memory systems.

  7. Capstone

    Build a complete persistent memory system for an AI agent that maintains context across sessions using ChromaDB with hybrid search, metadata filtering, and automated lifecycle management. Success criteria: agent recalls

Phase 11: Prompt Engineering Fundamentals

  1. Core Principles of Effective Prompt

    Explain the foundational principles of prompt engineering including clarity, context, and constraint specification for reliable LLM outputs.

  2. Zero-Shot and Few-Shot Prompting Techniques

    Implement zero-shot and few-shot prompting strategies to solve classification and generation tasks without model fine-tuning.

  3. Chain-of-Thought and Structured Reasoning Prompts

    Design chain-of-thought prompts that elicit multi-step reasoning for complex problem-solving tasks.

  4. Prompt Templates and Variable Interpolation

    Build reusable prompt templates with dynamic variable injection for scalable agent workflows.

  5. Output Parsing and Structured Response

    Implement robust output parsing strategies including JSON schema validation and error recovery for LLM responses.

  6. Prompt Evaluation and Iterative Refinement

    Design evaluation frameworks to measure prompt effectiveness using quantitative metrics and qualitative assessment criteria.

  7. Capstone

    Build a complete prompt engineering toolkit featuring templated prompts, automated evaluation harness, and structured output parsers for AI agent development tasks with documented success criteria: 1) toolkit handles 5 d

Phase 12: LLM API Integration

  1. Authenticating Requests to Major LLM

    Implement secure API authentication for OpenAI, Anthropic, and Google Gemini using environment variables and provider-specific SDKs.

  2. Structuring Chat Completion Requests and

    Construct properly formatted chat completion payloads with system, user, and assistant roles, then extract generated content, token usage, and finish reasons from provider responses.

  3. Handling Rate Limits

    Design resilient request logic that respects rate-limit headers, implements exponential backoff with jitter, and classifies HTTP status codes for retry decisions.

  4. Streaming Token-by-Token Responses for Real-Time

    Implement Server-Sent Events (SSE) consumption to render incremental token streams in a CLI or simple web interface, handling connection drops and partial outputs.

  5. Building a Reusable LLM Client

    Create a provider-agnostic Python class that normalizes request/response schemas, centralizes error handling, and exposes a unified generate() interface for downstream agents.

  6. Adding Observability

    Instrument the LLM client with structured logging, per-request cost estimation based on token counts, and latency percentiles exported to a local metrics store.

  7. Capstone

    Deliver a runnable Python application that lets users chat against OpenAI, Anthropic, and Gemini through a single CLI, automatically fails over on errors, and displays real-time cost/latency metrics — acceptance criteria

Phase 13: Local LLM Deployment with Ollama

  1. Installing and Configuring Ollama for

    Install Ollama on the local machine, verify the installation via CLI, and configure model storage paths for persistent local LLM access.

  2. Pulling and Managing Open-Source Models

    Pull, list, and remove open-source LLMs (e.g., Llama 3, Mistral) using Ollama commands, and inspect model metadata including parameter count and quantization level.

  3. Running Inference via Ollama REST

    Execute local LLM inference using both the Ollama REST API (curl) and the official Python library, parsing streaming and non-streaming responses into structured Python objects.

  4. Creating Custom Modelfiles for Domain-Specific

    Write and apply an Ollama Modelfile to define a custom system prompt, template, and parameters (temperature, num_ctx) for a specialized AI agent persona.

  5. Integrating Local LLMs into LangChain

    Instantiate a LangChain `ChatOllama` model, bind it to a ReAct agent with tools, and execute multi-step reasoning tasks entirely on local hardware.

  6. Optimizing Local Inference Performance with

    Compare inference speed and memory usage across quantization levels (4-bit, 8-bit) and enable GPU/Metal acceleration, selecting the optimal configuration for a target agent workload.

  7. Capstone

    Build and demonstrate a working AI agent that runs 100% locally using a custom Modelfile, LangChain tools (search, calculator, RAG retriever), and Ollama-served Llama 3, successfully completing 5/5 test queries with <10s

Phase 14: LangChain Core

  1. LangChain Architecture and LCEL Foundations

    Explain LangChain's core abstractions including LCEL (LangChain Expression Language), Runnable interface, and component composition patterns

  2. Prompt Engineering with ChatPromptTemplate and

    Implement dynamic prompt templates using ChatPromptTemplate, MessagesPlaceholder, and few-shot example selectors for consistent agent instructions

  3. Building Chains with LCEL

    Construct composable chains using LCEL pipe operator, RunnableParallel, RunnableBranch, and RunnableLambda for multi-step reasoning workflows

  4. Integrating Tools and Structured Output

    Implement tool calling with @tool decorator, StructuredTool, and PydanticOutputParser to enforce typed responses from LLMs

  5. Memory Management with ConversationBufferWindow and

    Design conversation memory using ConversationBufferWindowMemory, ConversationSummaryMemory, and vector-backed retrievers for long-context agents

  6. Creating Custom Agents with AgentExecutor

    Build a ReAct-style agent using AgentExecutor with custom tools, then migrate to LangGraph StateGraph for explicit state control and human-in-the-loop checkpoints

  7. Capstone

    Deliver a working research agent that answers questions by searching the web, retrieving from a vector store, citing sources inline, and maintaining conversation context across sessions — success criteria: handles 5+ too

Phase 15: LangGraph

  1. LangGraph Architecture and Stateful Graph

    Explain LangGraph's graph-based architecture, state management, and how it differs from linear chain approaches for building AI agents.

  2. Defining State Schemas and Reducers

    Implement typed state schemas with reducers to manage complex agent workflow state transitions in LangGraph.

  3. Building Conditional Edges and Branching

    Design conditional edges and branching logic to create dynamic agent decision-making paths based on state values.

  4. Integrating Tools and External APIs

    Implement tool-calling nodes that integrate external APIs and services into LangGraph workflows with proper error handling.

  5. Implementing Human-in-the-Loop Checkpoints and Interrupts

    Design human-in-the-loop workflows using interrupts and checkpoints for approval gates and collaborative agent interactions.

  6. Managing Persistent State with Checkpointers

    Configure persistent state management using checkpointers and thread-based conversations for long-running agent sessions.

  7. Capstone

    Build a working multi-agent research assistant using LangGraph that autonomously gathers information, synthesizes findings, and requests human approval before delivering final reports — artifact: a runnable Python applic

Phase 16: Tool Calling and Function Execution

  1. Understanding Function Calling Architecture for

    Explain the core architecture patterns enabling LLMs to invoke external functions including schema definition, tool registration, and execution loops

  2. Defining JSON Schemas for Reliable

    Design precise JSON schema definitions for function parameters that minimize hallucination and ensure type-safe execution

  3. Building a Tool Registry and

    Implement a centralized tool registry that manages function registration, validation, and dynamic dispatch with error handling

  4. Executing Functions with Timeout and

    Implement robust function execution wrappers featuring configurable timeouts, exponential backoff retries, and circuit breaker patterns

  5. Handling Streaming Tool Results in

    Integrate streaming function outputs into agent conversation loops while maintaining context coherence and token efficiency

  6. Securing Tool Execution with Permission

    Design and implement a permission-based access control system for tool execution with sandbox isolation for untrusted code

  7. Capstone

    Assemble a complete, documented tool-calling agent framework featuring registered tools (web search, file ops, API calls), streaming support, retry logic, and permission scopes that passes integration tests demonstrating

Phase 17: Retrieval-Augmented Generation (RAG) Pipelines

  1. RAG Pipeline Architecture for Agentic

    Explain the core components and data flow of a RAG pipeline tailored for AI agent decision-making loops

  2. Implementing Document Ingestion and Chunking

    Implement a document ingestion pipeline with adaptive chunking optimized for agent knowledge retrieval

  3. Building Hybrid Search with Dense

    Implement hybrid search combining dense vector similarity and sparse keyword matching for improved agent context retrieval

  4. Designing Agent-Aware Reranking and Context

    Design a reranking and context compression layer that prioritizes information relevance for specific agent tasks

  5. Integrating RAG with LangChain Agent

    Integrate the RAG pipeline as a callable tool within a LangChain agent executor for dynamic knowledge access

  6. Evaluating RAG Pipeline Performance with

    Evaluate RAG pipeline effectiveness using RAGAS metrics (faithfulness, answer relevance, context precision) for agent workflows

  7. Capstone

    Build a complete research agent that uses the RAG pipeline to answer complex queries over a custom document corpus, with measurable success criteria: >85% answer relevance score on RAGAS, <3s avg query latency, and succe

Phase 18: Agentic RAG

  1. Agentic RAG Architecture and Planning

    Explain the core components of an Agentic RAG system and differentiate planning strategies such as ReAct and Plan-and-Execute for multi-step retrieval tasks.

  2. Implementing Query Decomposition for Complex

    Implement a query decomposition agent that breaks complex user questions into sequential sub-queries for iterative retrieval.

  3. Building Adaptive Retrieval with Agentic

    Build an adaptive retrieval module where an agent dynamically reranks and filters documents based on intermediate reasoning steps.

  4. Integrating Structured Data Tools for

    Integrate SQL and API tools into the Agentic RAG pipeline to enable hybrid reasoning over unstructured and structured data sources.

  5. Implementing Self-Correction and Reflection Loops

    Implement self-correction mechanisms where the agent evaluates retrieval quality and triggers re-retrieval or tool use upon low-confidence outputs.

  6. Evaluating Agentic RAG with Multi-Hop

    Evaluate the Agentic RAG system using multi-hop question answering benchmarks (e.g., HotpotQA) measuring answer accuracy, retrieval precision, and tool-use efficiency.

  7. Capstone

    Build a domain-specific Agentic Research Assistant that answers complex multi-source questions with citations, achieving >85% accuracy on a curated 20-question evaluation set and <3s average latency per query.

Phase 19: ReAct Agent Implementation from Scratch

  1. Understanding the ReAct Prompting Pattern

    Explain the core components of the ReAct (Reasoning + Acting) pattern and how it interleaves thought, action, and observation steps to solve multi-step problems.

  2. Designing the Agent State and

    Implement a structured agent state class that maintains the conversation history, scratchpad for reasoning traces, and tool execution results across multiple ReAct iterations.

  3. Building the Tool Registry and

    Implement a tool registry that maps tool names to callable functions with schema validation, and build the execution loop that parses model output, invokes tools, and captures observations.

  4. Implementing the ReAct Reasoning Loop

    Implement the core ReAct loop that iteratively prompts the LLM for thoughts and actions, executes tools via the registry, appends observations, and terminates when a final answer is reached or max iterations exceeded.

  5. Adding Error Handling and Retry

    Implement robust error handling for tool failures, malformed model outputs, and parsing errors with exponential backoff retries and graceful degradation to keep the agent loop running.

  6. Optimizing Prompt Templates for Tool

    Design and refine few-shot prompt templates that improve tool selection accuracy and reasoning quality by including diverse examples of thought-action-observation trajectories.

  7. Capstone

    Build a complete ReAct agent that answers complex multi-step questions by combining web search and calculator tools, demonstrating: (1) successful decomposition of a 4+ step query, (2) correct tool selection at each step

Phase 20: Multi-Agent Systems with AutoGen

  1. Introduction to Multi-Agent Systems and

    Explain the core concepts of multi-agent systems and the AutoGen framework architecture including agent types and communication patterns

  2. Creating and Configuring AutoGen Agents

    Implement specialized AutoGen agents (UserProxyAgent, AssistantAgent) with distinct roles, system messages, and termination conditions

  3. Designing Multi-Agent Conversation Flows and

    Design and implement group chat conversations with multiple agents using GroupChat and GroupChatManager for collaborative problem solving

  4. Integrating External Tools and APIs

    Implement function calling and tool integration within AutoGen agents to enable external API interactions and data retrieval

  5. Implementing Human-in-the-Loop Feedback Mechanisms

    Build human-in-the-loop workflows using UserProxyAgent configuration for approval steps and interactive guidance during agent execution

  6. Optimizing Multi-Agent Performance with Caching

    Implement response caching, error handling, and retry logic to improve reliability and cost-efficiency of multi-agent systems

  7. Capstone

    Build a complete multi-agent code review system where specialized agents (CodeAnalyzer, SecurityReviewer, StyleChecker, SummaryAgent) collaboratively review Python code and produce a structured JSON report with issues ca

Phase 21: Agent Memory

  1. Understanding Memory Types in AI

    Explain the distinctions between short-term, long-term, and working memory in AI agent architectures.

  2. Implementing In-Memory Conversation History

    Implement a conversation history buffer using Python data structures to maintain short-term context.

  3. Integrating Vector Databases for Semantic

    Integrate a vector database (e.g., ChromaDB) to store and retrieve long-term semantic memories via embeddings.

  4. Designing Memory Retrieval Strategies

    Design and compare retrieval strategies (recency, relevance, importance) for augmenting agent context windows.

  5. Implementing Memory Consolidation and Summarization

    Implement a background process that summarizes and consolidates conversation history into long-term memory.

  6. Adding Memory Persistence and Lifecycle

    Add disk persistence and TTL-based expiration policies to the agent memory system.

  7. Capstone

    Build a personal assistant agent that maintains persistent memory across sessions, retrieves relevant context, and passes acceptance checks: (1) recalls user preferences from prior sessions, (2) answers questions using c

Phase 22: Planning and Task Decomposition Strategies

  1. Understanding Agent Planning Fundamentals

    Explain the role of planning in AI agent architectures and distinguish between reactive, deliberative, and hybrid planning approaches for Python-based agents.

  2. Decomposing Complex Goals into Subtasks

    Apply hierarchical task decomposition techniques to break down a high-level user goal into a structured sequence of executable subtasks for an AI agent.

  3. Designing Prompt Templates for Plan

    Design and implement reusable prompt templates that guide an LLM to generate structured, parsable plans in JSON or YAML format for Python agent consumption.

  4. Implementing a Plan Execution Engine

    Implement a Python class that parses structured plans, manages execution state, handles tool invocation, and tracks progress through subtasks.

  5. Handling Planning Failures and Replanning

    Implement error detection, fallback strategies, and dynamic replanning logic that allows an agent to recover from tool failures or unexpected outputs during plan execution.

  6. Integrating Memory with Planning Context

    Extend the plan execution engine to incorporate relevant memories from vector storage as context during plan generation and subtask execution.

  7. Capstone

    Build a complete AI agent that accepts a research question, generates a multi-step plan, executes subtasks using web search and summarization tools, handles failures with replanning, and delivers a final cited report — s

Phase 23: Human-in-the-Loop and Approval Workflows

  1. Designing Human-in-the-Loop Patterns for Autonomous

    Explain the core human-in-the-loop patterns (approval, feedback, escalation) and select the appropriate pattern for a given agent workflow scenario.

  2. Implementing Synchronous Approval Gates with

    Implement a synchronous approval gate in a LangGraph agent using the interrupt mechanism to pause execution and await human input before proceeding.

  3. Building Asynchronous Human Review Workflows

    Design an asynchronous human review workflow that integrates an external task queue (e.g., Celery/Redis) to handle long-running approval processes without blocking the agent.

  4. Creating a Web-Based Human Approval

    Develop a FastAPI web dashboard that displays pending agent approval requests and allows a human operator to approve, reject, or modify the agent's proposed action.

  5. Integrating Structured Feedback Loops for

    Implement a structured feedback loop where human corrections are captured, formatted, and fed back into the agent's context window to enable self-correction in the current run.

  6. Auditing and Logging Human-Agent Interactions

    Design a comprehensive audit logging system that records all human-agent interaction events (interrupts, decisions, feedback) to a structured database for compliance and debugging.

  7. Capstone

    Build a complete document processing agent that extracts data from invoices, pauses for human validation of high-value items via a web dashboard, incorporates feedback for re-extraction, and produces a full audit trail;

Phase 24: Evaluation and Observability for AI

  1. Defining Evaluation Metrics for AI

    Select appropriate quantitative metrics (accuracy, latency, cost, task success rate) for evaluating AI agent performance against defined benchmarks.

  2. Implementing Structured Logging for Agent

    Implement structured JSON logging in Python to capture agent decision chains, tool invocations, and intermediate outputs for debugging.

  3. Integrating Distributed Tracing with OpenTelemetry

    Instrument a multi-agent Python application with OpenTelemetry to generate distributed traces spanning LLM calls, tool executions, and inter-agent communication.

  4. Building Custom Evaluation Datasets and

    Construct representative evaluation datasets including edge cases and adversarial inputs to systematically test agent robustness and regression detection.

  5. Automating Regression Testing in CI/CD

    Integrate automated evaluation runs into existing CI/CD pipelines to gate deployments on metric thresholds and prevent performance regressions.

  6. Designing Real-Time Monitoring Dashboards for

    Create Grafana dashboards visualizing key agent metrics (latency percentiles, error rates, token usage, task completion rates) with alerting thresholds.

  7. Capstone

    Deploy a fully instrumented AI agent with automated evaluation gates, distributed tracing, structured logging, and real-time monitoring dashboards; success criteria: 99% trace coverage, <5% metric regression on deploy, d

Phase 25: Containerization and Deployment with Docker

  1. Docker Fundamentals for AI Agent

    Explain how Docker images, containers, and layers enable reproducible AI agent environments with GPU access

  2. Writing Multi-Stage Dockerfiles for Python

    Implement a multi-stage Dockerfile that installs PyTorch with CUDA support and copies only runtime dependencies for a 60% smaller image

  3. Managing Model Weights and Secrets

    Implement secure model weight injection using BuildKit secret mounts and .dockerignore to exclude 500MB+ model files from image layers

  4. Orchestrating Multi-Container Agent Systems with

    Design a docker-compose.yml that runs an agent API, Redis queue, and PostgreSQL state store with health checks and resource limits

  5. Configuring GPU Passthrough and Resource

    Configure NVIDIA Container Toolkit runtime and Docker Compose deploy resources to allocate 1 GPU and 16GB RAM per agent replica

  6. Implementing CI/CD Pipelines for Agent

    Implement a GitHub Actions workflow that builds, scans for vulnerabilities with Trivy, and pushes multi-arch images to GHCR on every merge to main

  7. Capstone

    Deliver a complete deployment artifact — a Git repository containing Dockerfile, docker-compose.yml, GitHub Actions workflow, and README — that builds a scanned multi-arch image, deploys a 3-service agent stack with GPU

Phase 26: Production Monitoring

  1. Instrumenting AI Agents with Structured

    Implement structured logging for AI agent workflows using Python's logging module and structured log formats

  2. Setting Up Metrics Collection with

    Configure Prometheus metrics exposition for agent performance, latency, and error rates

  3. Creating Grafana Dashboards for Agent

    Design Grafana dashboards visualizing agent health, throughput, and cost metrics

  4. Implementing Distributed Tracing for Multi-Agent

    Integrate OpenTelemetry tracing to track request flows across multi-agent architectures

  5. Configuring Alerting Rules for Production

    Define Prometheus alerting rules for anomaly detection, SLA breaches, and resource exhaustion

  6. Building Automated Incident Response Playbooks

    Create runbook automation for common agent failure scenarios using webhook integrations

  7. Capstone

    Deploy a complete monitoring stack (logging, metrics, tracing, alerting) for a multi-agent system with verified dashboards, alerts, and incident response documentation

Learn this with an AI mentor

Adaptive quizzes, weakness tracking, streaks — free.

Start This Roadmap Free →