Frameworks

LangChain vs LangGraph

LangChain is the broad toolkit — integrations, chains, and components for building LLM applications. LangGraph, from the same team, is the narrower engine for stateful agents: workflows modelled as graphs with explicit state, persistence, and human-approval stops. The confusion is natural because they share an ecosystem; the choice is about how much control your agent's loop needs.

Dimension LangChain LangGraph
What it is Component toolkit and integration layer Agent runtime modelled as a graph
Mental model Chains: composed steps, largely linear Nodes and edges with explicit shared state
Control over the loop Abstractions decide much of the flow You draw the flow — branches, cycles, retries
State and persistence Bolt-on per component First-class: checkpoints, resumable runs
Human-in-the-loop Possible, hand-rolled Native interrupt points in the graph
Sweet spot Integrations, prototypes, straightforward pipelines Production agents with audits, approvals, long runs

The verdict

Treat them as layers rather than rivals — LangGraph is built by the LangChain team and uses its integrations, so the real question is which layer owns your control flow. Prototype freely with LangChain components; the moment your agent needs to pause for approval, survive a restart mid-task, branch on intermediate results, or show an auditor exactly what path a run took, you are describing a graph with state, and fighting chain abstractions to fake one costs more than adopting LangGraph. Teams shipping consequential agents increasingly start in LangGraph for the loop and pull in LangChain components as parts — and either way, the readiness work around the framework — [identity, gates, evaluation](/guides/build-an-agentic-ai-system) — is unchanged, because the framework is the most replaceable layer in the system.

Frequently asked questions

Do I have to choose between LangChain and LangGraph?

No — LangGraph workflows routinely use LangChain integrations as their tools and model wrappers. Choose where the loop lives; reuse components from either side of that line.

Is your organisation ready for AI agents?

Take the assessment →