
LangGraph
You define the agent's flow as a graph of nodes and shared state; the model decides only what happens inside a node
What is LangGraph?
LangGraph has you define the agent's flow as a graph. Nodes are the units of work — an LLM call, a tool run — edges decide which node runs next, and every node reads and writes one shared state. Edges can branch on that state to form loops, and the state is checkpointed at each node, so a run can stop for a person's approval and resume later, or restart from the last checkpoint after a crash. The cost is code: a simple tool-calling agent takes noticeably more setup here than elsewhere.
What can you do with LangGraph?
- Define the flow as a graph — You place each step as a node and wire the edges between them yourself. The model decides what happens inside a node — never which node runs next.
- One shared state across every node — Findings, retry counts, approval flags: the run carries a single state object, and every node reads it and writes back to it.
- Branch and loop on the state — Conditional edges route the run based on the state — or send it back: search, draft, check, and search again when the draft falls short.
- Resume from a checkpoint — The state is saved at every node, so a run that dies partway restarts from the last checkpoint instead of from the beginning.
- Pause for human approval — The run can stop at a node you pick, so a person can inspect and correct what is about to happen before it continues.
- Start higher up with Deep Agents — Deep Agents, built on top of LangGraph, covers planning, sub-agents and file use — skip designing the graph when you do not need that control.
Before you choose LangGraph
- Restarting picks up from the last saved point, not the last thing the agent did. On the managed service, slow steps have been reported to run two or three times over, and cancelling a run can lose the newest state.Reported in#7417#5672
- The approval step is a building block rather than a finished feature — you assemble the review screen yourself, and asking a person several questions in a row has shown the earlier question again instead of the new one.Reported in#8026#3275
- The tool the project points to for seeing what an agent did, LangSmith, is a separate paid product: free for one person up to 5,000 traces a month, $39 per seat beyond that, and self-hosting only on the Enterprise plan.
Star history
15 Aug to 30 Oct · +4.4k
Frequently asked questions
Is LangGraph free for commercial use?
LangGraph is released under the MIT licence — OSI-approved open source, which permits commercial use.
How can LangGraph be deployed?
LangGraph is available as Self-hosted / Managed cloud.