DD-10 — LangGraph: Graph-Based State Machines

LangGraph: Graph-Based State Machines

The most architecturally distinct harness. Explicit nodes and edges. Super-step checkpoints. interrupt() for HITL. Used INSIDE Claude Code. The orchestration baseline and the Module 8 reference.

60
minutes
9
artifacts
37/60
rubric score
The loop as an explicit, editable, testable graph. Nodes are functions. Edges are transitions. State is serialized at every node boundary. interrupt() is structural HITL — the model cannot route around it because the model does not control the edges. For a class of use cases the process IS the product: regulated workflows, compliance pipelines, multi-approval flows. This is the largest architectural divergence in the roster and the C4 E09 reference for declared multi-agent coordination.
Key Claims
Load-Bearing Claims

The loop IS the graph — the largest architectural divergence in the roster. Every other harness hides its loop in an implicit while-true. LangGraph makes the loop a declared, visible, testable, editable graph you draw before you run it. Module 1 (Loop): 5/5 — the reference. This is the framework for when the process is the product.

Super-step checkpoints are the Module 8 reference at 5/5. State is serialized at every node boundary — the granularity is the STEP, not the session. A crash resumes from the last completed node. For multi-day, multi-human workflows this is the difference between "resume from where you were" and "resume from approximately where you were."

interrupt() is the cleanest HITL primitive in the roster — structural, not behavioral. The edge from propose to execute goes through an interrupt node. The model cannot route around the approval because the model does not control the edges — the graph definition does. Same principle as NemoClaw (DD-09): enforcement outside the agent's reach.

Subgraphs provide declared multi-agent coordination — the C4 E09 pole. A multi-agent system is a graph of subgraphs: each subagent is a node, edges between subagents are declared transitions. LangGraph is the declared-coordination pole; CrewAI (DD-12) is the emergent-coordination pole. The contrast defines the multi-agent axis the way NemoClaw-vs-Tau defines the governance axis.

After This Module
01
State LangGraph's defining thesis — the loop is an explicit, editable, testable graph — and explain why this is the largest architectural divergence in the roster.
02
Distinguish the three core primitives (nodes as functions, edges as transitions, state serialized at every node boundary as super-step checkpoints) and explain why each earns its 5/5 score (Module 1 Loop, Module 8 State).
03
Explain why interrupt() is the cleanest HITL primitive in the roster — structural, not behavioral — and why a prompt-injected model cannot route around it.
04
Apply the "when is the graph right vs wrong" decision rule: the graph is right when the process is the product; the graph is wrong when the model could figure out the process (the graph-fights-the-model anti-pattern).
05
Connect LangGraph's subgraph pattern to multi-agent orchestration (Module 10) and to Course 4's E09 module — where LangGraph and CrewAI are the two poles of the declared-vs-emergent coordination axis.
Artifacts
01
Teaching Document
The loop-is-the-graph thesis, the three primitives (nodes, edges, super-steps), interrupt() as structural HITL, the Module 8 reference, the graph-right-vs-wrong decision rule, the subgraph multi-agent pattern and C4 E09 connection, the 37/60 score profile; with learning objectives, anti-patterns, key terms, references
READ
02
Diagrams
5 Mermaid/n8n diagrams — the graph IS the loop, super-step checkpoints (Module 8 reference), structural interrupt() vs naive HITL, the graph-right-vs-wrong decision matrix, the n8n state-machine workflow
READ
03
Slide Deck
10 slides — reveal.js, dark theme, design-system teal; covers the thesis, the three primitives, structural HITL, the Module 8 reference, graph-right-vs-wrong, multi-agent subgraphs and C4 E09, the score profile, anti-patterns, the lab
READ
04
Teaching Script
Verbatim teaching transcript with [SLIDE N] cues, ~3,000 words spoken at ~140 wpm across 10 slide cues
READ
05
Flashcards
21 flashcards (TSV) — mix of recall, application, and analysis; covers the three primitives, super-step checkpoints, structural HITL, the decision rule, the C4 E09 connection, the anti-patterns
TEST
06
Exam
15 questions, 20/40/40 Bloom distribution (3 recall / 6 application / 6 analysis), 70% pass; validated JSON with rationale per question
TEST
07
Lab Spec
Build a LangGraph-Style State Machine — runnable simulation (Python 3.10+): nodes as functions, edges as a transition table, super-step checkpoints, interrupt() structural HITL the model cannot route around, subgraph multi-agent coordination (~45-60 min)
DO
08
Module Web Page
Single-file HTML hub — this page
HERE