LangGraph
A low-level runtime for stateful agents: graphs of nodes and edges over shared state, with checkpointing, interrupts and streaming built in.
What it is
LangGraph’s documentation describes it as an orchestration runtime focused on the capabilities agents need in production: durable execution, streaming and human-in-the-loop1. You define workflows as graphs of shared state, nodes and edges, and can mix deterministic steps with model-driven steps in the same graph3.
Diagram: my own simplification of a typical tool-calling graph.
- State is a shared object, typically typed, that every node reads and updates.
- Nodes are functions: a model call, a tool call, or ordinary code.
- Edges decide what runs next, including conditional edges that route on state, which is how loops form.
Why people choose it
The docs highlight a short list of capabilities2:
- Persistence. State is checkpointed so runs resume after failures or pauses.
- Human-in-the-loop. You can pause execution, inspect or edit state, then continue.
- Deterministic and agentic steps together. Hand-coded nodes sit beside model-driven ones.
- Memory. Short-term working memory for a run, and long-term memory across sessions1.
Checkpointing is what makes the other features possible. A checkpointer saves state after each step, so a graph can stop at an approval point and continue later, or survive a crash.
Diagram: my own.
This maps directly onto notes elsewhere here: State and checkpoints, Human in the loop and Memory.
Where it sits
LangChain’s docs place LangGraph as the runtime layer. Higher-level options build on it: LangChain’s agent abstractions, and Deep Agents, a harness with planning, subagents and file tools1. The docs suggest those if you want to build agents quickly, and LangGraph when you need low-level control1.
Strengths and trade-offs
My assessment, from reading the docs rather than from benchmarks:
- Good fit: long-running or approval-gated workflows, explicit control over branching and loops, and cases where you must resume after failure.
- Cost: more concepts and boilerplate than a simple agent loop. For a single tool-calling agent, the higher-level agent constructor is usually enough.
- Debuggability: explicit graphs are easy to reason about and trace, but you must design the state schema well.
- Ecosystem coupling: it integrates smoothly with LangChain components, though you can use it with plain model clients.
Practical tips
- Compile with a checkpointer from the start, even in development, so pause and resume behave the same as in production.
- Keep state small and serialisable; store large artifacts elsewhere and keep references.
- Put side effects behind explicit nodes so approvals can gate them (Human approval).
- Trace every run (Tracing and monitoring).
- Set recursion or step limits (Stopping conditions).
Compare with other options in Choosing a framework.
Sources
- [1]LangGraph overview — LangChain docsPARAPHRASED
- [2]LangGraph overview (JavaScript) — LangChain docsPARAPHRASED
- [3]LangGraph documentation home — LangChain docsPARAPHRASED