LangGraph extends LangChain for building stateful, cyclic agent workflows as graphs. Master the vocabulary for state machines, conditional edges, checkpointers, and interrupt/resume patterns used in production agent systems.
0 / 5 completed
1 / 5
A developer creates a LangGraph graph with StateGraph(AgentState) and adds nodes. What does each node in LangGraph represent?
In LangGraph, each node is a Python function (or Runnable) that receives the current State object and returns an updated state dictionary. Nodes perform the actual work: calling LLMs, executing tools, or routing decisions. The state flows from node to node along edges, enabling complex agent workflows.
2 / 5
A LangGraph agent needs to route to different nodes based on whether a tool was called. Which concept handles this conditional routing?
Conditional edges in LangGraph are functions that examine the current state and return the name of the next node to visit. They enable branching logic — for example, routing to a tools node if the LLM requested a tool call, or to END if the agent has finished.
3 / 5
Your LangGraph workflow needs to pause execution and wait for human approval before continuing. Which mechanism supports this pattern?
LangGraph's interrupt/resume pattern uses interrupt() inside a node to pause execution at a specific point. Combined with a checkpointer (e.g., MemorySaver or a database-backed saver), the graph state is persisted. Execution resumes later by calling graph.invoke() again with the same thread_id.
4 / 5
What is the role of a checkpointer in a LangGraph application?
A checkpointer saves the full graph state (all node outputs, messages, custom fields) to a storage backend after each step. This enables: multi-turn conversation memory (same thread_id), human-in-the-loop interrupts, and fault-tolerant resumption of long-running workflows.
5 / 5
In LangGraph, the AgentState uses Annotated[list, operator.add] for the messages field. What does this annotation control?
The Annotated[list, operator.add] pattern defines a state reducer. When a node returns {"messages": [new_msg]}, LangGraph uses operator.add to append the new message to the existing list rather than replacing it. This pattern is critical for accumulating conversation history correctly.