What is LangGraph?
LangGraph is an open-source framework for building stateful, multi-step AI agent workflows as directed graphs. Nodes do the work, edges decide what runs next, and a shared state object carries data between steps, so a run can branch, loop back, pause for a human, and resume.
LangGraph comes from the team behind LangChain and ships as a permissively licensed library for Python and JavaScript. Graphs are defined in application code, so version control, code review, and tests apply to the workflow itself the same way they apply to the rest of the service.
How LangGraph works
LangGraph compiles a workflow from four primitives: state, nodes, edges, and a checkpointer. State is a typed object, usually a schema or dictionary, that every step reads and writes; it is the memory of the run. Nodes are plain functions or model calls that receive the state and return an update to it. Edges connect nodes, and conditional edges route on the contents of the state, which is how a graph branches or returns to a node it has already visited. The checkpointer persists state after each node to a store, so a run survives a crash, a timeout, or a wait for approval.
That loop is what separates a graph from a straight prompt chaining sequence, and it is the machinery an AI agent framework needs before its behaviour deserves the label agentic AI. Multi-agent designs push the same idea up one level: a supervisor node reads state and dispatches to sub-graphs, which is AI agent orchestration expressed as code.
Types of LangGraph topologies
Linear pipeline: Nodes run in a fixed sequence with no branching, which suits classify, then retrieve, then draft flows in a support reply.
Conditional router: A node inspects state and a conditional edge selects the next branch, such as billing, returns, or escalation, based on a classification.
Cycle (reason and act loop): The graph alternates between a model node and a tool node until a stop condition is satisfied, always with a step cap to bound cost.
Supervisor multi-agent: One coordinating node delegates to specialist sub-graphs and merges their state updates, though shared state gets contentious as the number of agents grows.
Human-in-the-loop interrupt: The graph pauses at a named node, persists its state, and resumes when a person approves, edits, or rejects the pending action.
LangGraph vs prompt chaining vs agent orchestration vs workflow engines
Teams meet these four ideas in the same week, and the vocabulary blurs, because all of them promise to make a sequence of steps happen reliably. Prompt chaining runs a fixed sequence of model calls in which each output feeds the next step. Agent orchestration describes the coordination problem of getting several agents, tools, and systems to finish one task together. A workflow engine executes business processes defined ahead of time, with durable retries, timers, and an audit trail. LangGraph is the code-level layer underneath: it gives one agent, or a supervised team of them, an explicit control graph and a state that outlives a failure.
What it holds | Control flow | Who maintains it | Handles cycles | Choose it when | |
|---|---|---|---|---|---|
LangGraph | Typed shared state, checkpointed after every node | Explicit graph with conditional edges | Engineers, inside the application repo | Yes, bounded by a step cap | Runs must loop, pause for a human, and resume |
Prompt chaining | Whatever the previous call passed forward | Fixed linear sequence of model calls | Whoever authored the prompts | No, the sequence runs once | The task is short, known, and deterministic |
Agent orchestration | Coordination policy and per-agent context | Delegation across agents and tools | A platform or automation team | Depends on the platform | Several agents and systems must cooperate |
Workflow engine | Process instance variables and history | Predefined process model with retries | Operations and platform engineering | Rarely, by design | The process is stable and must be audited |
If the path is fixed and short, chaining is enough. If the process is stable and heavily audited, a workflow engine wins on durability and tooling. Choose LangGraph when an agent has to decide its own next step and still be resumable, inspectable, and interruptible.
Why LangGraph matters for customer experience
An AI support agent handling a refund has to look up the order, confirm eligibility, call a payment API, and write the outcome back to the ticket. When that sequence lives inside a single prompt and a single model call, a tool timeout halfway through leaves no durable record of what already succeeded, and a blind retry issues the refund twice.
A graph makes the sequence inspectable. Each node has a name, each transition is logged, and the checkpoint records exactly where the run stopped and what state it held. When a case falls outside policy, an interrupt node hands it to a person with the full trail attached, which is the working version of the gap between scripted bots and agentic systems.
The tradeoff is real. Expressing behaviour as a graph is slower to change than editing a prompt, and a two-node graph often carries more ceremony than the problem deserved.
How is LangGraph measured?
LangGraph has no score of its own, being a library; what gets measured is the agent running on it, and the graph is what makes those measurements cheap. The signals that matter are step success rate per node, trajectory correctness (did the run take the path a reviewer would have chosen), interrupt rate, successful resumes after a checkpoint restore, and tokens plus wall-clock latency per completed run. Because every transition is named and persisted, all of these can be computed from checkpoint history without extra instrumentation.
Model capability underneath the graph does have published benchmarks. The Stanford HAI AI Index reported that on SWE-bench, an agentic coding benchmark, systems solved 4.4% of tasks in 2023 and 71.7% in 2024. Read that range as a ceiling on what a graph can orchestrate, never as a forecast of your own resolution rate.
How AI agents use LangGraph in production
A production support agent built on LangGraph usually starts with an intake node that classifies the ticket and normalises the customer identifier. A conditional edge routes to a retrieval node for policy questions or to a tool node for account actions. The tool node calls the CRM or order system, writes the result into state, and passes control to a validation node that checks the proposed action against policy thresholds. Anything above the threshold hits an interrupt, and everything below it goes straight to a reply node.
Because the graph is code, the same design can be unit-tested with fake tool responses and replayed against real checkpoints after an incident. The consequence is a shift in where reliability work happens: less prompt tuning, more control-flow design, which is the pattern behind most agentic support workflows that survive contact with real ticket volume.
What to look for when adopting LangGraph
Start with control-flow coverage: does your problem genuinely need cycles, interrupts, and resumable runs, or is it a sequence that a simpler pipeline already handles. Then look at the integration surface, which in practice means the checkpointer backends you can run (in-memory for tests, a real database in production), the tracing you get per node, and how tools are declared and authorised.
Governance is about ownership of the graph definition. Graphs live in the application repo, so review, versioning, and deployment follow engineering process, and someone has to own the policy thresholds encoded in the edges.
Because the library runs inside your own infrastructure, certification questions land on the hosting environment and the model provider, and regulated buyers ask how SOC 2 Type II evidence is produced for those components. The constraint most teams miss is checkpoint lifecycle: persisted state contains customer data, it accumulates, and in-flight runs break when node names change under them.
LangGraph and conversational state
A support graph's state object is quietly doing the job that dialogue state tracking has always described: holding the user's goal, the slots filled so far, and the commitments the system has already made. LangGraph makes that record explicit and durable, so a reviewer can read it after the conversation ends.
Retrieval nodes need structured sources to branch on, and a knowledge graph fits the shape well, since a traversal returns entities and relationships that a conditional edge can test directly.
What does LangGraph mean in plain terms?
Think of LangGraph as a flowchart that actually runs, with a clipboard carried from box to box. Each box does one job, writes down what it learned, and passes the clipboard on. The arrows decide where it goes next, and a copy of the clipboard is filed after every box, so a power cut means you resume at the last box rather than the front door.
Without the clipboard, the same work still happens, but each step only knows whatever the previous step happened to mention, and a failure in the middle sends everyone back to the beginning.
The cost is that you have to draw the boxes and the arrows before anything runs. A system allowed to go anywhere is harder to draw, and the drawing is real work done up front, which is why small, well-understood tasks rarely repay it.
Common LangGraph mistakes
Unbounded cycles are the expensive one. A loop whose exit condition depends on the model deciding it is finished can fail to converge, and without a step cap the graph keeps calling tools and burning tokens until something else times out.
Overloaded state is the subtle one. When every node mutates one large shared object, nodes acquire hidden dependencies on each other's field names, and parallel branches start overwriting each other's updates because no reducer was defined for the contested keys.
Building the org chart first is the common one. Teams reach for a supervisor and four specialist sub-graphs before the single-agent version has been measured, adding coordination overhead to a failure they never diagnosed.
Ignoring checkpoint lifecycle is the one that surfaces months later. The store grows, it holds customer data with no retention rule, and a rename of a node strands every run that was paused inside it.
What is LangGraph used for?
LangGraph is used to build AI agents whose work takes several steps, calls tools, and sometimes needs a human. Typical uses include support ticket resolution, research assistants, coding agents, and back-office automation, anywhere a run has to branch on intermediate results, retry safely after a failure, and be inspected afterwards.
What is the difference between LangGraph and LangChain?
LangGraph and LangChain come from the same maintainers and solve different layers. LangChain supplies components: model wrappers, tool interfaces, retrievers, and prompt utilities. LangGraph supplies control flow and durable state, letting those components run as a graph with cycles, checkpoints, and interrupts. Many teams use both together, and LangGraph can run without LangChain components.
What is the difference between LangGraph and prompt chaining?
LangGraph and prompt chaining both sequence model calls. Chaining runs a fixed line of steps where each output feeds the next, with nothing persisted between them. LangGraph adds a typed shared state, conditional routing, loops back to earlier nodes, and a checkpoint after each step, so a run can pause, resume, and be audited.
How does LangGraph handle human approval steps?
LangGraph handles approval through interrupts. The graph pauses at a designated node, writes its current state to the checkpointer, and returns control to the calling application. A person reviews the pending action, approves or edits it, and the run resumes from that exact point with the edited state, without replaying earlier steps.
Is LangGraph open source?
LangGraph is open source under a permissive license, and the core library can be installed and run inside your own infrastructure with no external service. The maintainers also offer commercial hosting and tooling around it for deployment, persistence, and observability, which teams adopt separately from the library itself.
Does LangGraph work with TypeScript?
LangGraph ships in both Python and JavaScript or TypeScript, with the same core concepts in each: state schemas, nodes, conditional edges, and checkpointers. Feature parity between the two moves over time, so teams building on the JavaScript version should check that the specific checkpointer backend and tooling they need is available.

