Core architectural primitives
LangGraph builds on four primitives. State is a typed dictionary-like object that stores all data relevant to the current execution — conversation history, intermediate results, flags, and any other information nodes need to read or produce. Nodes are Python functions that take the current state and return an updated state; each node encapsulates one computational step, which may be a model call, a tool invocation, a state transformation, or a routing decision. Edges define transitions: a regular edge always moves from one node to the next; a conditional edge evaluates a function and selects among multiple possible next nodes based on the result. The graph object compiles these elements into an executable workflow that can be run, inspected, and interrupted.
Checkpointing and persistence
LangGraph's checkpointer saves the state of the graph at each node transition to an external store, enabling workflows to resume after interruption. This is significant for long-horizon agents: a workflow that requires hours of execution can be paused at any checkpoint and resumed without restarting, which reduces both cost and latency for tasks that cannot complete in a single invocation. Human-in-the-loop patterns work through checkpointing: the graph is defined to pause at designated points, the state is saved, a human reviews and approves or modifies it, and execution resumes. Without a checkpointer, state exists only in memory and is lost if the process terminates.
Deployment and observability
LangGraph Server provides an infrastructure layer for deploying LangGraph workflows as services — handling request routing, state persistence, and concurrent execution across multiple workflow instances. The execution model supports streaming intermediate outputs so that clients can observe agent progress as it happens rather than waiting for final results. Because state is explicit and typed, debugging is more tractable than in systems with implicit state: the state at any node transition can be inspected, replayed, or modified for testing. Observability tools that instrument LangChain also instrument LangGraph by default, since LangGraph uses LangChain's model interfaces.