LangGraph
State graphs, agent loops, HITL, RAG agents, multi-agent systems, and streaming workflows.
Introduction
Foundational lesson: why LangGraph exists, what problem it solves, and how graph-based stateful control differs from linear LLM pipelines.
Levels of Autonomy in LLM applications
Autonomy ladder: from deterministic code (zero autonomy) to fully agentic decision loops, with practical trade-offs at each level.
Agents & Tools - Intro
Detailed foundation for agentic execution: agent as decision-maker, tools as bounded capabilities, and the action-observation loop.
Agents & Tools - Implementation
Implement a ReAct-style agent from scratch to understand thought-action-observation before LangGraph abstractions.
Drawbacks of ReAct Agents
Where plain ReAct breaks in production and how graph-level controls reduce reliability, latency, and cost failures.
Reflection Agent - Introduction
Reflection agents add a critique stage so outputs can be improved before finalization.
Reflection Agent - Creating Chains
Compose generator and reflector chains with explicit contracts so reflection remains testable and stable.
Reflection Agent - Building The Graph
Wire generator and reflector into a controlled graph loop with quality thresholds and deterministic termination.
Reflection Agent - LangSmith Tracing
Trace reflection loops to measure quality lift, loop efficiency, and revision cost before scaling to production.
Structured LLM Outputs
Use schema-constrained outputs to make routing and tool execution deterministic.
Reflexion Agent - Introduction
Reflexion extends reflection by grounding critique/revision with live external data via tools.
Reflexion Agent - Building Responder Chain
Build responder output contract: draft answer + critique + search terms for evidence collection.
Reflexion Agent - Building Revisor Chain
Revisor consumes draft + tool evidence, then rewrites output with better grounding and citations.
Reflexion Agent - Tool Execution Component
Execute responder/reviser search intents, normalize observations, and append tool messages into state.
Reflexion Agent - Building Graph
Wire responder, tool execution, and reviser into a bounded iterative graph with clear termination rules.
What is StateGraph?
StateGraph is the execution backbone in LangGraph: explicit state schema, node transitions, and controlled cycles.
Manual State Transformation
Update custom state fields directly inside nodes (e.g., count, sum, history) to understand explicit state mutation.
Declarative Annotated State Transformation
Use annotated reducers (e.g., add/concat) so state merge logic is declarative instead of duplicated in each node.
ReAct using LangGraph - Overview
Why ReAct agents benefit from graph orchestration: explicit reason/act cycles, policy guards, and predictable termination.
ReAct using LangGraph - Reasoning Runnable
Build the reasoning runnable that converts state into either AgentAction or AgentFinish with strict output contracts.
ReAct using LangGraph - State
Design the ReAct state object: input, agent outcome, and intermediate steps that accumulate execution history.
ReAct using LangGraph - Building Nodes
Implement reason and act nodes with strict contracts, deterministic state updates, and safe tool invocation.
ToolExecutor (Deprecated)
Adapting to API evolution: replacing deprecated ToolExecutor usage with explicit tool dispatch for stability.
ReAct using LangGraph - Final Graph
Assemble the full ReAct graph: node registration, conditional routing, loop edge, entrypoint, and compile/invoke flow.
ReAct using LangGraph - LangSmith Tracing
Use trace-level observability to inspect node execution, tool calls, route decisions, and end-to-end latency in ReAct graphs.
Chatbot Introduction
Roadmap from basic chatbot to tools, memory, human-in-the-loop, complex state, and time-travel.
Chatbot Basic
Build the minimal START -> chatbot -> END graph and understand invoke/stream behavior and no-memory limitation.
Chatbot with Tools
Add tool-calling with router + ToolNode so chatbot can fetch live data before final response.
Chatbot with Memory - What is Checkpointer?
Introduce checkpointers + thread IDs for conversation persistence across invocations.
Chatbot with SqliteSaver Checkpointer
Replace in-memory checkpointing with SQLite-backed persistence for restart-safe sessions.
Human in the Loop - Introduction
Foundational HITL patterns: approve/reject, state edit, and tool-call review for controlled autonomy.
Human in the Loop - Command Class
Use Command for edgeless routing and state updates inside nodes, then combine with interrupts.
Human in the Loop - Resume Graph
Pause with interrupt, inspect checkpoint next-node state, then resume execution using Command(resume=...).
Human in the Loop - Review Tool Calls
Interrupt before tool execution so humans can approve/reject costly or sensitive tool calls.
Human in the Loop - Multi-turn Conversations
Integrate interrupts into iterative human feedback loops for refinement workflows.
RAGs - Introduction
Refresh how RAG works in two stages: build a searchable knowledge base, then retrieve grounded context at query time.
RAGs - Classification-Driven Retrieval
Route on-topic questions through retrieval and block off-topic requests with deterministic graph control.
RAGs - RAG-powered Tool Calling
Expose retrieval as a tool and let the agent decide when to call it, including off-topic handling tools.
RAGs - Multi-step Reasoning (Advanced)
Production-style RAG graph with question rewriting, retrieval grading, controlled refinement loops, and memory.
Multi-agent Intro - What are Subgraphs?
Why multi-agent systems are needed, architecture patterns, and how subgraphs are embedded in parent graphs.
Multi-agent - Supervisor Agent System
Implement supervisor orchestration with enhancer/researcher/coder/validator agents and command-based routing.
Streaming Deep Dive
Build production-grade responsiveness with state streaming, token streaming, event filtering, and node-aware UI updates.