Week 05: LangGraph — Stateful Multi-Agent Systems

Build: Supervisor + specialist agent network with state management
Overview
Topics
Weekly Build
Resources
Homework

What You'll Learn

LangGraph is where serious agent orchestration happens. You'll understand state machines, node and edge composition, conditional branching, and how to build multi-agent networks that coordinate without getting into infinite loops.

Session Schedule

DayTimeFocus
Saturday8:00 - 11:00 PM WATLangGraph Architecture & State Machines
Sunday8:00 - 11:00 PM WATMulti-Agent Build

Pre-Requisites

  • Weeks 01-04 completed
  • CORTEX M1 started
  • Understanding of agent patterns from Week 02

Topics Covered

LangGraph State Machines

StateGraph, TypedDict state, node functions, compile & invoke. The foundation of building stateful, composable agent workflows.

StateGraph TypedDict Nodes

Supervisor & Specialist Patterns

Supervisor routing, specialist agents, delegation patterns. How to build a boss agent that knows which worker to call.

Supervisor Specialist Delegation

Conditional Edges & Branching

add_conditional_edges, router functions, dynamic routing based on state. Build graphs that make intelligent decisions at every node.

Conditional Edges Router Dynamic Routing

Human-in-the-Loop Checkpoints

interrupt_before, interrupt_after, checkpoint persistence, approval flows. Let humans supervise and approve critical agent decisions.

HITL Checkpoints Interrupts

Parallel Agent Execution

Fan-out/fan-in, parallel node execution, result aggregation. Run multiple agents simultaneously and merge their outputs.

Parallel Fan-out Aggregation

Weekly Build: Supervisor Agent Network

Build a supervisor that routes queries to 3 specialist agents (Knowledge, Research, Action) based on intent classification.

Architecture

User Query + Context
    |
    v
SUPERVISOR NODE (intent classification)
    |
    ├── condition: "knowledge" → KNOWLEDGE AGENT
    ├── condition: "research" → RESEARCH AGENT
    ├── condition: "action"   → ACTION AGENT
    └── condition: "unknown"  → FALLBACK RESPONSE
    |
    v
RESPONSE NODE (format & return)

Key Files

FilePurpose
agents/supervisor.pyLangGraph state machine
agents/knowledge_agent.pyKnowledge specialist agent
agents/research_agent.pyResearch specialist agent
agents/action_agent.pyAction specialist agent
graph.pyGraph definition & compilation

Resources

Required Reading

  • LangGraph Official Documentation
  • LangGraph Multi-Agent Tutorial
  • LangGraph Human-in-the-Loop Guide

Code Repository

Clone the bootcamp repo and switch to the week-05 branch:

git clone https://github.com/softbricks-academy/agentic-ai-bootcamp.git
cd agentic-ai-bootcamp
git checkout week-05

Session Recording

Recording will be available within 24 hours after the live session. Check the WhatsApp group for the link.

Homework

Due before Week 6 live session.

  1. Complete the supervisor agent network — push your code to the bootcamp repo
  2. Add a 4th specialist agent — extend the supervisor to route to a new specialist of your choice
  3. Implement checkpointing — add human-in-the-loop approval before the action agent executes
  4. Test with 10 diverse queries — document routing accuracy and share results in the WhatsApp group