ModelRefs / LangGraph — AI Glossary

LangGraph — AI Glossary

A graph-based agent orchestration framework from LangChain that models agent workflows as stateful directed graphs.

Overview

LangGraph enables complex multi-agent systems with cycles, conditional branching, human-in-the-loop interrupts, and persistent checkpointing. It is the production successor to LangChain's AgentExecutor for stateful agent workflows.

Reference details

Topicframeworks
Last reviewed2026-06-24

How it works

  1. An application is declared as a graph: nodes are functions, edges are transitions, and a typed state object is threaded through both. The graph is the control flow, written down rather than emergent from a model's choices.
  2. Each node receives the current state and returns an update rather than mutating it. How updates combine is declared per field by a reducer — overwrite for a scalar, append for a message list — which is what makes concurrent nodes writing to one state well-defined.
  3. Conditional edges route on a function of the state, so branching is a property of data. Cycles are permitted, which is the capability a pipeline framework lacks and retry or refine loops require.
  4. A checkpointer persists the state at every transition to a backing store. This is what enables resume after failure, inspection of an earlier step, and forking a run from a past state.
  5. Interrupts are declared at specific nodes, pausing the run before or after execution so a human can inspect or edit the state and resume. The checkpointer is the mechanism; the interrupt is the declaration.
  6. Durability has an operating cost, since every transition writes state. Checkpoint size and retention become real infrastructure decisions rather than framework details.

Example: What the checkpointer costs to run

A graph averages 20 transitions per run and carries a state object of about 10KB once the message history is included. Each transition writes a checkpoint, so one run produces 20 x 10KB = 200KB. At 10,000 runs a day that is 10,000 x 200KB = 2GB per day, and about 2 x 30 = 60GB per month of checkpoint data. The number is not alarming, but it is a database that needs a retention policy, and the default of keeping everything turns a debugging convenience into unbounded growth. It also scales with the wrong thing: state size grows with conversation length, so a run with 60 transitions and a 40KB state writes 60 x 40KB = 2.4MB, twelve times the average run, and the heaviest runs are precisely the long debugging-worthy ones you most want retained. The practical settings are a retention window short enough to bound the store and long enough to cover a support cycle, plus keeping large payloads out of the state behind references — the same projection discipline that applies to tool results.

Commonly confused with

LangGraph is not LangChain, and the relationship confuses version decisions. LangChain is a library of components — model wrappers, loaders, retrievers — plus chains that compose them. LangGraph is an orchestration layer for stateful, cyclic, durable workflows and can be used with or without those components. Choosing between them is a category error: the real question is whether your control flow needs cycles, checkpointing and human interrupts, which is what LangGraph provides and what a linear chain does not.

When to use it

Reach for it when:

  • Workflows with cycles — retry, refine, clarify — which a DAG-shaped pipeline cannot express.
  • Human-in-the-loop requirements, where an interrupt needs a declared node to pause at and durable state to resume from.
  • Long-running or resumable jobs, where a crash should cost one step rather than the whole run.
  • Anything requiring an audit trail, since the checkpoint sequence reconstructs exactly what happened.

Reach for something else when:

  • Single model calls or linear pipelines, where the graph is ceremony around work that has no branches.
  • Prototyping an unclear problem, where the graph will be restructured more often than a prompt and each restructure costs more.
  • Genuinely open-ended exploration, where declaring states forecloses paths that are the point of the exercise.
  • Without planning for checkpoint storage. Durability is the main feature and it writes on every transition.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to LangGraph — AI Glossary.

Frequently asked questions

What is LangGraph?

A graph-based agent orchestration framework from LangChain that models agent workflows as stateful directed graphs.

What concepts are related to LangGraph?

Closely related concepts include langchain, multi agent, agent workflow.