Skip to content
About 7 min read0% read

LangChain vs LangGraph: which one to use for AI agents

Otomatzia editorial team · Last verified · Prices checked December 2026

Short answer

Pick LangChain when you want a working agent fast: one `create_agent` call gives you a model, tools and a loop. Pick LangGraph when you need to control the flow yourself, with saved state, human approval steps and fixed steps mixed with model-driven ones. LangChain is built on LangGraph, so you can start with one and move to the other.

Key facts
TopicDetail
LangChainAgent framework with `create_agent`, middleware and model integrations (LangChain docs)
LangGraphLow-level orchestration runtime for long-running, stateful agents (LangGraph docs)
RelationshipLangChain is built on top of LangGraph, and you do not need to know LangGraph to use LangChain (LangChain docs)
LicenceBoth libraries are MIT licensed and free to use (langgraph and langchain on GitHub)
Versions seenlangchain 1.5.2 (18 Nov 2026) and langgraph 1.2.24 (20 Nov 2026) on PyPI (langchain, langgraph)
Optional paid layerLangSmith for tracing and deployment: Developer $0, Plus $39 per seat a month (LangSmith pricing)

Choose LangChain if, choose LangGraph if

Choose LangChain if you are building a straightforward agent: a model that calls tools in a loop until the task is done. LangChain's own guidance says to use it when you want to build quickly, need standard abstractions for models, tools and the agent loop, and have no complex orchestration needs.

Choose LangGraph if the flow itself is the hard part. The same guidance lists fine-grained control over orchestration, durable execution for long-running stateful agents, workflows that mix deterministic and agentic steps, and production deployment infrastructure.

You do not have to pick once and stay. LangChain agents run on LangGraph underneath, so a prototype written with LangChain can later gain graph-level control. Our LangChain profile and LangGraph profile list who uses each, and the LangChain provider page groups the agencies that work with them.

How LangChain, LangGraph, Deep Agents and LangSmith fit together

The vendor splits its stack into layers. LangChain's docs describe LangChain as the agent framework, LangGraph as the orchestration runtime (durable execution, streaming, human-in-the-loop, persistence), Deep Agents as an agent harness with planning, subagents and filesystem tools on top of LangGraph, and LangSmith as the platform for tracing, evaluation, prompts and deployment.

LangGraph does not require LangChain. Its docs say examples often use LangChain for model and tool integrations, but you can use LangGraph on its own. If you want a ready-made loop first, the same page points to Deep Agents or LangChain agents before LangGraph. For what an agent harness is, see our guide to the AI agent harness, and for the term itself the AI agent glossary entry.

Five questions that settle it

Answer these in order and stop at the first yes. This is our checklist, built on the vendor's own selection guidance.

  1. Does the agent need to pause for a person to approve an action and resume later? If yes, use LangGraph, or LangChain with its human-in-the-loop middleware and a checkpointer.
  2. Does a run last long enough that a crash would hurt? If yes, use LangGraph for durable execution.
  3. Do you need to mix fixed steps with model-driven ones in one flow? If yes, use LangGraph.
  4. Is the job a model calling tools until it finishes? If yes, use LangChain.
  5. Still unsure? Start with LangChain. Because it is built on LangGraph, you can add graph-level control later.

Scored comparison on six criteria

Scores run from 1 (weak) to 5 (strong) and are our reading of the official documentation, not a benchmark. The reason column says what each score rests on.

On the first four criteria a higher score means better. On learning curve, 5 means easiest to pick up.

LangChain and LangGraph scored on stated criteria (1 to 5, our judgment from the docs)
CriterionLangChainLangGraphWhat the score rests on
Time to a first working agent53LangChain: one `create_agent` call with model, tools and prompt. LangGraph: you define state, nodes and edges first (overview)
Control over the flow25LangGraph describes itself as low-level control over state and control flow; LangChain's loop is model-driven (products page)
Saved state and resume after failure35Persistence and durable execution are LangGraph runtime features; LangChain's `create_agent` accepts a LangGraph checkpointer (agents docs)
Human approval before an action45LangChain has human-in-the-loop middleware; LangGraph has `interrupt()` that pauses and resumes (interrupts docs)
Ready-made model and tool integrations53LangGraph docs examples usually borrow LangChain for these (overview)
Learning curve (5 = easiest)53LangChain says you do not need to know LangGraph to use it (products page)

One documented failure mode each

LangChain: a model-driven loop can run away. Because the model decides when to stop, a confused agent can keep calling the model and tools. LangChain ships model call limit and tool call limit middleware for exactly this, described as preventing infinite loops, excessive costs and runaway agents. Turn a limit on before you run an agent unattended.

LangGraph: a graph can loop until it hits the step cap. The docs describe the GRAPH_RECURSION_LIMIT error as a graph reaching its maximum number of steps before a stop condition, often from a cycle such as node a pointing to node b and back. A second trap is state storage: the interrupts docs say to use a durable checkpointer in production, and their examples use an in-memory one, so a restart would lose paused runs.

What it costs at three usage levels

Both libraries are free under the MIT licence, per the LangGraph repository and the LangChain repository. The paid part is optional: LangSmith, the vendor's tracing and deployment platform. Model API bills are separate and not shown here. Prices checked December 2026.

On LangSmith's pricing page the Developer plan is $0 per seat with up to 5,000 base traces a month and one seat. Plus is $39 per seat a month with up to 10,000 base traces, then pay as you go. The billing docs describe the included 10,000 traces as an organization-level allowance (the initial 10,000 free traces per month). Trace overage beyond those 10,000 is pay as you go at the rate on LangChain's pricing page, so check that rate before budgeting. The levels below show only the sourced seat arithmetic.

LangSmith monthly cost at three usage levels, December 2026 (USD, our arithmetic) · Vendor prices, checked December 2026
Usage levelPlanMonthly costHow we got itVendor page
Solo prototype, 1 developer, under 5,000 tracesDeveloper$0Free seat, 5,000 base traces includedLangSmith pricing
Small team, 3 seats, 10,000 tracesPlus$1173 seats at $39, 10,000 traces includedLangSmith pricing, billing docs
Production, 3 seats, 100,000 tracesPlus$117 plus trace overage$117 for seats; overage beyond the 10,000 included traces is pay as you go, rate on the pricing page, check before budgetingLangSmith pricing, billing docs

What deployment adds to the bill

Running your agent on LangSmith's hosting is a separate meter. According to the pricing page, Plus includes one small serverless Agent Server, and additional servers are billed by resource use, with serverless and dedicated options in small, medium and large sizes. Serverless servers scale to zero when idle, and the page recommends dedicated servers for customer-facing agents. If you host the agent on your own infrastructure instead, none of that applies and LangGraph and LangChain remain free to run.

Enterprise is custom priced and adds self-hosted and hybrid deployment, according to the same pricing page. VC-backed startups can apply for credits of up to $10,000 through LangSmith for Startups, per the same page.

Versions and licence we checked

On 1 December 2026, PyPI listed langchain 1.5.2 (uploaded 18 November 2026, Python 3.11 or newer) and langgraph 1.2.24 (uploaded 20 November 2026, Python 3.10 or newer). Both GitHub repositories show an MIT licence, and both had been pushed to within the previous two days. APIs move quickly in this ecosystem, so check the version in your own project before copying code from any comparison, including this one.

Questions people ask about LangChain and LangGraph

Short answers, checked against the official docs in December 2026.

What is LangGraph and LangChain?

LangChain is an agent framework with abstractions for models, tools and the agent loop. LangGraph is a low-level orchestration runtime for long-running, stateful agents, built around graphs of state, nodes and edges. LangChain is built on top of LangGraph.

Is LangGraph still relevant?

Yes, as of December 2026. LangChain's own docs say LangChain is built on LangGraph, so it sits under the main framework. PyPI shows langgraph 1.2.24 uploaded on 20 November 2026, and the GitHub repository was last pushed to on 30 November 2026.

What is the difference between LangChain, LangGraph and LangSmith?

LangChain and LangGraph are open source libraries you build with. LangSmith is a separate platform for tracing, evaluating and deploying agents, and it works with agents built on any of these frameworks. LangSmith has a free Developer plan and a paid Plus plan at $39 per seat a month.

Do I need LangChain to use LangGraph?

No. The LangGraph overview says it does not require LangChain, although many of its examples use LangChain for model and tool integrations.

Want help choosing for a real project

If you are deciding between frameworks for a production agent, a short scoping call can save a rebuild. Send us the use case and we will tell you which layer fits.

Sources

Vendor features and prices change. Confirm details on the linked official pages before you rely on them.

Keep reading

More in this topic: AI agent builders and frameworks

All guides