Framework comparison
LangChain vs LangGraph: what's the difference and when to use each
LangChain is a high-level framework of components and integrations — chat models, tools, retrievers, RAG pipelines, and a standard agent — for building LLM apps quickly. LangGraph is a low-level orchestration runtime for building stateful, graph-based agents and workflows with cycles, persistence, and human-in-the-loop. They are made by the same team and complement each other: LangChain's agents now run on the LangGraph runtime, and you drop down to LangGraph when you need more control.
They are not really competitors. Reach for LangChain to assemble a standard agent or RAG pipeline fast; reach for LangGraph when the control flow gets complex enough that you need to model it as an explicit graph with durable state.
Short answer: different layers, same stack
The framing that trips people up is "vs". LangChain and LangGraph sit at different levels of abstraction in the same ecosystem, both built by LangChain Inc. LangChain is the agent framework — the fast path to a working agent. LangGraph is the orchestration runtime underneath it — the low-level engine you reach for when a standard agent loop is no longer enough. As of the 1.0 releases (October 2025), LangChain's agents are built on top of the LangGraph runtime, so the question is rarely which one, but how far down the stack you need to go.
What is LangChain
LangChain is a high-level framework for building applications with large language models. Its value is in components and integrations: a provider-agnostic chat-model interface, tool definitions, retrievers and vector stores, and the glue for retrieval-augmented generation. You compose these into an agent — and in current LangChain, create_agent is the standard entry point: a pre-built tool-calling agent that works across providers (Anthropic, OpenAI, Google, and others) with a few lines of code.
The point of LangChain is speed to a working system. If you want a standard agent with tools, or a RAG pipeline, without wiring orchestration by hand, this is the layer you start at. Its primitives are the same ones any agentic system needs — see the agentic AI architecture for the vendor-neutral version of those layers.
What is LangGraph
LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents. Instead of a pre-built loop, you model the control flow explicitly as a graph: nodes (steps) connected by edges, sharing a central, typed state object. Because edges can form cycles, you can express the reasoning loops and conditional branching that a linear chain cannot.
Its core capabilities are what make stateful agents production-grade: durable execution (state is checkpointed, so a run survives a restart and resumes where it left off), persistence (state saved across threads via a checkpointer), streaming, and first-class human-in-the-loop (pause on a node, wait for approval, resume). LangGraph is standalone — it does not require LangChain components, though it integrates with them. It is the orchestration layer; for the broader pattern vocabulary it implements, see agentic AI design patterns.
LangChain vs LangGraph: key differences
The two are designed to be used together, so the differences are about level and intent, not rival feature sets.
| Dimension | LangChain | LangGraph |
|---|---|---|
| Abstraction level | High-level agent framework / API | Low-level orchestration runtime |
| Primary use | Compose models, tools, retrievers, RAG; build a standard agent fast | Orchestrate long-running, stateful, controllable agents and workflows |
| Control flow | Pre-built tool-calling loop (create_agent) | Explicit graph of nodes and edges; supports cycles |
| State | Managed by the agent loop and middleware | Explicit, centralized shared state in a graph |
| Persistence | Inherited from the LangGraph runtime underneath | First-class: checkpointers, durable execution, threads |
| Human-in-the-loop | Built-in middleware (approve / edit / reject tool calls) | Native: pause and resume on graph state |
| Reach for it when | Standard agent, RAG, prototyping | Custom, controllable, durable multi-step or multi-agent flows |
How they fit together
The relationship is the part most "vs" articles get backwards. LangGraph is the low-level runtime, and LangChain is the high-level API built on that runtime — create_agent uses LangGraph under the hood to run its loop. So every LangChain agent already is a LangGraph graph; you just did not have to write it.
That gives a clean migration path rather than a fork in the road: start with LangChain's high-level agent, and when you need more control — custom branching, a step that pauses for human approval, durable state across a long run — drop down to LangGraph without leaving the ecosystem. You can also use LangChain components (models, tools, retrievers) inside LangGraph nodes, so adopting LangGraph does not mean abandoning the integrations you already wired up.
When to use which
A practical decision rule:
- Use LangChain when the shape of the work is a standard tool-calling agent or a RAG pipeline, and you want to ship quickly. It is the fastest path to a working agent with a conventional architecture, and the right default for prototyping.
- Use LangGraph when control flow is the hard part: multi-step workflows with loops and conditional branching, durable state that must survive restarts, human-in-the-loop checkpoints, or multi-agent orchestration where several agents coordinate. Choosing it earlier than you need is the over-engineering trap — let the complexity justify the lower-level tool.
Because LangChain runs on LangGraph, the cost of starting high and dropping down later is low. Begin with the framework; graduate to the runtime when a standard loop stops fitting the problem.
Frequently asked questions
What is the difference between LangChain and LangGraph?
LangChain is a high-level framework of components and integrations — models, tools, retrievers, RAG — with a pre-built agent for building LLM apps quickly. LangGraph is a low-level orchestration runtime for building stateful agents as explicit graphs with cycles, persistence, and human-in-the-loop. They are made by the same team and operate at different layers of the same stack rather than competing.
What is LangGraph?
LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents. You model control flow as a graph of nodes and edges sharing a central state, with support for cycles, durable execution, streaming, persistence, and human-in-the-loop. It is built by LangChain Inc. and can be used with or without LangChain's components.
Is LangGraph part of LangChain?
LangGraph is a separate, standalone library, not a sub-module of LangChain, and it does not require LangChain to run. The dependency actually runs the other way: LangChain's agent framework is built on top of the LangGraph runtime, so LangChain's agents use LangGraph under the hood. Both are open-source projects from the same company, LangChain Inc.
When should you use LangGraph instead of LangChain?
Reach for LangGraph when control flow is the hard part: multi-step workflows with loops and conditional branching, durable state that must survive a restart, human-in-the-loop approval steps, or multi-agent coordination. LangChain's high-level agent is the faster start for standard tool-calling and RAG; drop down to LangGraph when that standard loop no longer gives you enough control.
Can you use LangChain and LangGraph together?
Yes — they are designed for it. LangChain components such as models, tools, and retrievers can be used inside LangGraph nodes, and every LangChain agent already runs on the LangGraph runtime. The intended path is to start with LangChain's high-level API and seamlessly drop down to LangGraph when you need more control, without leaving the ecosystem.
Is LangGraph better than LangChain?
Neither is better; they sit at different abstraction levels. LangGraph gives more control over stateful, complex orchestration, while LangChain gives faster assembly of a standard agent or RAG pipeline. The right choice depends on how much control the problem demands — and because LangChain is built on LangGraph, you can use both, starting high and going lower only when needed.
- LangGraph definition, capabilities, and ecosystem roles: LangGraph overview, docs.langchain.com/oss/python/langgraph/overview.
- LangChain positioning and
create_agent: LangChain overview, docs.langchain.com/oss/python/langchain/overview. - Relationship (LangChain built on the LangGraph runtime), durable state, middleware, and the 1.0 GA (October 2025): LangChain & LangGraph 1.0 announcement, langchain.com/blog/langchain-langgraph-1dot0.
- Nodes, edges, state, and checkpointing: Thinking in LangGraph, docs.langchain.com/oss/python/langgraph/thinking-in-langgraph.
Both libraries move fast; APIs and product names change. Verify exact signatures against the live docs before building. Corrections: hello@aiarch.dev.
Learn to choose orchestration tools by building real agents.
AI Architect Academy teaches the layers underneath frameworks like LangChain and LangGraph — orchestration, memory, tools, retrieval, and the operational plane — as first-class skills, on a platform that is itself a production agentic system. The build is the curriculum.
Free sample — no signup · every claim cited · cancel anytime
Or get notified when new tracks ship.