From Tokens to Embodied Minds  ·  Drill cards · Chapter 22
Drills

LangGraph and orchestration that survives

10 atomic recall cards. Export to Anki and let spaced repetition do its slow work.

10 cards due for review

In Anki: File → Import, choose this TSV, set field separator to Tab, deck = Tokens to Embodied Minds · Ch 22, note type = Basic.

FrontBack
What is the LangGraph state primitive and how is it structured?A TypedDict annotated with reducer functions. Each key has a type and an optional Annotated[T, reducer] annotation specifying how concurrent node writes are merged.
What does a LangGraph node's function signature look like?(state: State) -> dict — receives the full current state, returns a partial update dict that is merged into the state by the graph runner.
What does LangGraph's interrupt() primitive do?Pauses execution at a node boundary and surfaces the current state to a human reviewer via the API or Studio UI. Execution resumes after the human approves, rejects, or modifies the state.
What is time-travel debugging in LangGraph?Calling get_state_history() to retrieve all checkpointed states for a run, then update_state() to inject a corrected state at a prior checkpoint and re-run from that point.
When should you use CrewAI instead of LangGraph?For prototypes with fewer than 5 sequential steps, no external writes, no human-in-the-loop requirement, and no need for checkpoint-based recovery. CrewAI is adequate for demos; LangGraph is required for production with external side effects.
What is the node design principle in LangGraph?Each node does exactly one logical thing: retrieve, score, draft, or send — not multiple. The irreversible send action is a separate node always preceded by an interrupt. This makes time-travel replay safe and each node independently testable.
How does LangGraph handle a failure at node 8 of a 10-node graph?The checkpointer has persisted state after nodes 1–7. On restart, the graph loads the last checkpoint (state after node 7) and resumes from node 8 without re-executing nodes 1–7.
What is the difference between interrupt-before and interrupt-after in LangGraph?Interrupt-before: the graph pauses before executing the target node, allowing the human to inspect and modify state before the node runs (use for irreversible actions). Interrupt-after: pauses after node execution — use when you want the human to review the node's output before deciding to proceed.
What is the production checkpointer for LangGraph and why?Postgres. It is durable (survives process restarts), queryable (you can inspect checkpoint history via SQL), and supports concurrent runs (multiple thread_ids in the same table).
At what frequency can the LangGraph graph loop for a humanoid task planner?1–5 Hz for high-level task planning. Checkpointing overhead (10–50ms per state serialization) is acceptable at this rate. The inner control loop at 50 Hz is handled by GR00T's DiT or SmolVLA directly, not by LangGraph.