Skip to content

LangChain vs LangGraph: which one you actually need

Updated By Agent Radar5 min read

Short answer

LangChain vs LangGraph: LangChain is the create_agent harness; LangGraph is the low-level runtime it runs on. When to use each, from the official docs.

Top pick: LangChain. LangChain provides create_agent, a configurable harness around a model, tools, a prompt and middleware. Its own overview says those agents are built on top of LangGraph.

They are not two competing agent frameworks you have to pick between. LangChain's own overview says create_agent is a harness built on LangGraph. LangGraph's overview says it is the low-level runtime for durable, stateful graphs, and that you should start with Deep Agents or LangChain agents if you want a higher-level loop. The search query "LangChain vs LangGraph" is usually about which layer to write against. Sources checked 2026-11-08.

Quick comparison

LangChainLangGraph
What it isAgent framework: create_agent plus model, tool and middleware integrationsLow-level orchestration framework and runtime for stateful agents
Starting pointcreate_agent(model=..., tools=..., system_prompt=...)A StateGraph with nodes, edges and shared state
Built onLangGraph, according to the LangChain overviewStands alone; does not require LangChain
Control flowThe harness loop, shaped with middlewareYou define the graph, including deterministic and LLM-driven nodes
Durable runsInherited from LangGraphPersistence, checkpoints, resume after failure or a pause
Human-in-the-loopAvailable because agents run on LangGraphPause, inspect or edit state, then continue
Official "use this when"A highly customizable harness tailored to your dataExplicit control over state and control flow
LicenseMITMIT

How they differ

Layer, not a fork

LangChain's docs split the stack this way: Deep Agents is a batteries-included harness (planning, subagents, filesystem tools, context management) on top of LangGraph; LangChain is the agent framework; LangGraph is the orchestration runtime; LangSmith is tracing, evaluation and deployment. If you only remember one sentence, remember that one. Installing langchain still lands you on a LangGraph runtime for the agent loop.

LangGraph's docs make the same cut from the other side. It "does not prescribe prompts or agent architecture." Docs examples often use LangChain for models and tools, but that is convenience, not a hard dependency.

Starting an agent

LangChain's first example is a create_agent call: a model string, a Python tool and a system prompt, then agent.invoke(...). The harness is everything around the model loop. Middleware is how you add behavior without dropping down to graph nodes.

LangGraph's first example builds a StateGraph, adds a node, connects START and END, compiles, then invokes. That is more code for "hello world" and more control once the workflow is no longer a single tool loop.

Persistence and pauses

This is LangGraph's listed focus: durable execution, streaming, human-in-the-loop and persistence, plus short-term thread state and longer-term memory. You checkpoint a run, pause for a person, edit state and resume.

LangChain agents get those capabilities because they run on LangGraph, not because create_agent reimplements them. If your design problem is "the loop should stop here and wait for approval," you will eventually see LangGraph state even if you started from create_agent.

When the names get confusing

People compare them because the names sound like alternatives and because older LangChain docs centered on chains rather than create_agent. The current overviews are explicit: start higher (create_agent or Deep Agents) unless you already know you need to draw the graph. Use LangGraph directly when parts of the workflow must stay deterministic, or when you need to own the state schema.

For other framework pairings see LangGraph vs Google ADK, LangChain vs CrewAI and LangGraph vs CrewAI.

Releases checked for this page

GitHub listed LangChain 1.4.9 on November 4, 2026 and LangGraph 1.2.20 on November 5, 2026. Those dates describe the tagged package releases, not a claim that every companion package (langchain-core, langgraph-cli and the rest) stopped there.

The tools

  1. Rank 1

    LangChain

    MITOpen source

    LangChain provides create_agent, a configurable harness around a model, tools, a prompt and middleware. Its own overview says those agents are built on top of LangGraph.

    Pros

    • Start from create_agent instead of wiring a graph of nodes and edges yourself
    • One interface for models and tools across providers; middleware can add guardrails, retries or routing
    • Official docs point here when you want a customizable agent loop rather than a low-level runtime

    Cons

    • The high-level loop hides the graph you may later need to inspect or reshape
    • Tracing and managed deployment sit in LangSmith, whose pricing is not stated in the cited sources
  2. Rank 2

    LangGraph

    MITOpen source

    LangGraph is a low-level orchestration framework and runtime for long-running, stateful agents defined as graphs of shared state, nodes and edges.

    Pros

    • Mixes hand-coded deterministic steps and LLM-driven steps in one graph
    • Persistence, streaming and human-in-the-loop are first-class; you can pause, edit state and resume
    • Does not require LangChain and does not prescribe prompts or agent architecture

    Cons

    • The docs call it low-level and recommend Deep Agents or LangChain agents if you want a higher-level loop first
    • You design the state schema, nodes and edges yourself

Questions

Is LangGraph a replacement for LangChain?

No. LangChain's overview says its agents are built on top of LangGraph so they can use durable execution, human-in-the-loop and persistence. LangGraph's overview says you can use it without LangChain. They are layers, not rivals that cancel each other out.

When should I use LangChain instead of LangGraph?

The LangChain overview says to use create_agent when you want a highly customizable harness around a model, tools, a prompt and middleware. The LangGraph overview says to use Deep Agents or LangChain agents if you want a higher-level agent loop first.

When should I use LangGraph instead of LangChain?

The LangGraph overview says to use LangGraph when you need explicit control over state and control flow, especially workflows that mix deterministic steps with LLM-driven steps and need to persist, stream or pause for a human.

Can I use LangGraph without LangChain?

Yes. The LangGraph docs say examples often use LangChain for models and tools, but LangGraph does not require LangChain.

Are LangChain and LangGraph open source?

Both repositories are reported as MIT by the GitHub API: langchain-ai/langchain and langchain-ai/langgraph.

Where does LangSmith fit?

Both overviews describe LangSmith as the platform for tracing, evaluation, prompts and deployment across these frameworks. That is a separate product; this page does not quote its prices.

More guides

View all