LangGraph: stateful agent workflows you can pause, resume and replay
An MIT-licensed orchestration runtime for long-running agents: typed state, nodes and edges, checkpoints that survive restarts, human approval with interrupt(), time travel, Studio for debugging, and managed or self-hosted deployment.
- Vendor
- LangChain, Inc.
- Licence
- MIT
- Category
- Apps and agents
- Latest release
- 1.2.15 · 12 Oct 2026 · Release notes (opens in a new tab)
Best for
Agents and workflows that must persist state, wait for human approval, survive restarts and mix fixed steps with model-driven ones
Avoid when
A single model call or a short fixed pipeline does the job; plain functions and a queue are simpler to run and to debug
On this page
LangGraph is for agents that cannot fit in one request. You describe the work as a graph of steps over a typed state; LangGraph saves the state after every step, so a run can stop for a person's approval, survive a crash, resume a day later in another process, or be replayed from any earlier point. It mixes ordinary code and model calls in the same graph, which is how you keep the risky parts deterministic.
What it is and where it sits#
LangGraph is a low-level orchestration framework and runtime from LangChain, Inc., MIT licensed, with Python and JavaScript versions. Version 1.0 shipped in October 2025; the Python package is at 1.2.15 (12 October 2026) and the JavaScript package @langchain/langgraph at 1.5.0. It does not need the rest of LangChain, though the docs use LangChain components for models and tools.
The pieces:
- State. A
TypedDict, Pydantic model or dataclass shared by every step. Fields can have reducers (for exampleAnnotated[list, add_messages]) that merge updates instead of overwriting them. - Nodes. Plain functions that read the state and return an update. A node can call a model, run a tool, query a database or apply a business rule.
- Edges. Fixed edges, and conditional edges whose function returns the name of the next node.
Sendfans work out in parallel;Commandlets a node update state and jump in one return. - Checkpointers. After every step the state is written to a checkpointer (in-memory, SQLite, Postgres and others), keyed by a
thread_id. That one mechanism gives you memory across turns, resume after failure, human-in-the-loop and time travel. - Interrupts.
interrupt(payload)inside a node pauses the run, saves state and returns the payload to the caller;Command(resume=value)continues from that point with the value as the return ofinterrupt().
LangChain names the surrounding products like this today: LangChain is the higher-level agent framework (its create_agent replaces LangGraph's deprecated create_react_agent), Deep Agents is a planning-and-subagents harness built on LangGraph, LangSmith is the platform for tracing, evaluation and prompts, LangSmith Studio is the visual debugger, and LangSmith Deployment (with its Agent Server runtime) runs graphs in production.
In the stack, LangGraph is the agent runtime. Models arrive through your gateway, tools through code or MCP, and traces go to LangSmith or any OpenTelemetry backend.
When to pick it#
Pick LangGraph when:
- A run outlives a request. A refund that waits for a manager, a research task that takes 40 minutes, an onboarding flow that spans days.
- People must approve or edit before something irreversible happens. Interrupts pause exactly where you need them, with the state saved.
- You need to recover from failure. Checkpoints let a run continue from the last completed step instead of starting over and repeating paid model calls.
- You want fixed rules around model calls. Deterministic routing, limits and validation live in nodes and edges you can read, not in a prompt.
- You need to debug multi-step behavior. Every step's state is stored, so you can inspect, fork and replay a run.
Pick something simpler when:
- The task is one model call or a short fixed chain. A function is clearer than a graph, and a queue with retries handles background work.
- You want an agent loop with built-in tools and no graph design. LangChain's
create_agent, Deep Agents or the Claude Agent SDK get you there faster; reach for raw LangGraph when you need control they do not give. - Your workflow engine already exists. Workflow engines such as Temporal can pin a run to the code version it started on. LangGraph applies the newest graph code to every paused thread, which is convenient for bug fixes and dangerous for renames.
How it works#
A run moves through super-steps. In each one, the scheduled nodes run (in parallel when several are ready), their updates are merged into the state through the reducers, the checkpointer writes a checkpoint, and edges decide what runs next. The run ends at END, or pauses at an interrupt().
Threads and checkpoints. You pass {"configurable": {"thread_id": "refund-A-104"}} with every call. Reusing a thread id continues that conversation or workflow; a new id starts with empty state. graph.get_state(config) returns the latest snapshot, get_state_history lists every checkpoint, and invoking with a past checkpoint_id replays or forks from that point.
Durability modes. You choose per call how hard LangGraph works to save: durability="exit" writes only when the run finishes or pauses (fastest, but a crash loses the progress), "async" writes in the background while the next step runs, and "sync" writes every checkpoint before the next step starts (safest, a little slower).
Interrupts. A node calls interrupt(payload, response_schema=Approval); the caller sees the payload under result["__interrupt__"], or on stream.interrupts with the newer graph.stream_events(..., version="v3") streaming API. Resuming reruns the interrupted node from its first line, so any code before interrupt() runs twice. Keep side effects out of that code. With a Pydantic response_schema (LangGraph 1.2.12 or newer), the resume value is validated and Studio renders it as a typed form.
Two APIs, one runtime. The Graph API (nodes, edges, shared state) suits branching, parallel paths and workflows people need to see as a diagram. The Functional API (@entrypoint and @task decorators) adds checkpoints and interrupts to ordinary Python control flow with less ceremony. Both can live in one application.
Set it up
Members only below this line
Get the full LangGraph: stateful agent workflows you can pause, resume and replay deep dive free
What you get on this page:
- 6 members sections
Also in the members part
- Production configuration
- Wiring it into the stack
- Operating it
- Alternatives compared
- Learn it hands-on
Sources
Checked against these on 13 Oct 2026.
- LangGraph overview (opens in a new tab)docs.langchain.com
- LangGraph interrupts (human-in-the-loop) (opens in a new tab)docs.langchain.com
- LangGraph checkpointers and durability modes (opens in a new tab)docs.langchain.com
- LangGraph backward compatibility for in-flight threads (opens in a new tab)docs.langchain.com
- Choosing between the Graph and Functional APIs (opens in a new tab)docs.langchain.com
- LangSmith Studio for LangGraph (opens in a new tab)docs.langchain.com
- LangSmith Deployment and its environments (opens in a new tab)docs.langchain.com
- LangGraph CLI and langgraph.json reference (opens in a new tab)docs.langchain.com
- LangChain pricing (LangSmith Deployment) (opens in a new tab)langchain.com
- LangGraph releases (opens in a new tab)github.com