AI Glossary

LangGraph

Agentic AIPublished By Simon Budziak

LangGraph is a low-level orchestration framework from the LangChain team for building AI agents as a state graph: nodes that run a step, edges that route to the next one based on the current state, cycles that let an agent loop, and interrupts that pause the graph for a human decision before it continues.

Most agent frameworks hide the control flow behind a single run call. LangGraph does the opposite: it makes the control flow the thing you actually design, as an explicit graph you can inspect, pause, and resume. The diagram below shows the shape of a typical graph.

A LangGraph state graph: an agent node routes through a conditional edge to a tool node or a human-approval interrupt, loops back with updated state, and exits at END once the goal is met

A chain runs top to bottom once. A LangGraph graph can loop, branch, and pause for a person, because the control flow is data, not just code.

What are nodes, edges, and state in a LangGraph graph?

A node is a single step, usually a call to the model or a tool; an edge routes execution from one node to the next, and can be conditional, deciding the next node based on what the current state actually contains rather than following a fixed path. State is the object every node reads and updates, so the graph always knows where a run actually is, which is what lets LangChain’s components stay stateless while the graph carries state on their behalf.

Why does a graph need cycles at all?

Because an AI agent rarely finishes in one pass. A straight line handles a fixed pipeline; a cycle is what lets an agent call a tool, look at the result, and decide to call another tool or the same one again, the loop that turns a chain into something that actually behaves like an agent rather than a script.

How does a human-approval interrupt actually work inside the graph?

An interrupt pauses the graph at a named node and hands control back to the calling code, exactly the mechanism behind a human in the loop gate: the graph’s state is checkpointed, a person reviews or edits it, and execution resumes from that exact point rather than restarting. This is what makes LangGraph a common choice for agents that touch anything genuinely risky, since the pause is a first-class part of the graph, not a workaround bolted on afterward.

When does a team actually need LangGraph instead of plain LangChain?

Not for a single retrieval call or one tool invocation, LangChain’s components handle that directly. LangGraph earns its complexity once a workflow needs branching decisions, a loop that runs an unknown number of times, or multiple agents coordinating, the kind of structure covered under multi-agent systems. Every run traced through LangSmith shows exactly which node ran, which edge fired, and where an interrupt paused, turning a graph that would otherwise be hard to debug into one a team can actually reason about.

Frequently asked questions

What is the difference between LangGraph and a plain LangChain chain?

A chain runs a fixed sequence once, top to bottom. A LangGraph graph can branch on the current state, loop an unknown number of times, and pause at a named node for a person, which is what a fixed chain cannot do on its own.

Does LangGraph require using LangChain first?

No, LangGraph works as its own low-level orchestration layer. In practice most teams pair it with LangChain's components for the model calls, retrieval, and tool integrations that fill in the graph's individual nodes rather than writing that glue by hand.

How does a human-approval interrupt actually pause a LangGraph run?

The graph checkpoints its state at a named node and hands control back to the calling code. A person reviews or edits that state, and execution resumes from the exact point it paused rather than restarting the whole run from the beginning.

Summarize this page with

See how this works in a real workflow