Comparison

LangChain vs LangGraph vs Deep Agents: which one do you need?

LangChain, LangGraph and Deep Agents are three layers of one open-source stack, not three rivals. LangChain is the agent framework: one interface to dozens of model providers plus create_agent, the standard tool-calling loop, which since LangChain 1.0 runs on the LangGraph runtime. LangGraph is that low-level runtime: it saves each step of a thread so a run can resume, streams output, and pauses for human approval. Deep Agents is the batteries-included harness on top, adding file tools, subagents, skills and automatic summarisation for long, multi-step work.

The real question is where in the stack to start. Below: each layer, a decision table, and one WhatsApp message traced through all three.

In this guide

LangChain vs LangGraph vs Deep Agents at a glance

LangChain's documentation calls them a runtime, a framework and a harness; columns run bottom layer to top.

LangGraphLangChainDeep Agents
What it isAn agent runtime and low-level orchestration framework.An agent framework: model and tool interfaces, the create_agent loop and middleware.An agent harness: an opinionated agent built on create_agent.
Abstraction levelLowest. You define the state, nodes and edges.Middle. You pick a model, tools, a prompt and middleware; the loop is written for you.Highest. You add tools and instructions to an agent that already delegates and manages files.
What it addsDurable execution, checkpoints per thread, streaming, interrupts for human approval.One interface to dozens of model providers, tool calling, structured output, prebuilt middleware.File tools over a pluggable backend, subagents, skills, summarisation, large-result offloading.
Pick it whenSteps must run in a fixed order, or code and model calls mix.One agent calls a handful of tools and answers.The job is long and multi-step: research, reports, code, many documents.
What you still buildThe agent loop, unless a layer above provides it.Persistence, approvals, any planning or file handling.Backend, checkpointer, approval rules, and everything outside the agent: channels, credentials, hosting.

What is LangChain?

LangChain is the framework you build an agent with: a common interface to chat models from Anthropic, OpenAI, Google, Mistral, local Ollama servers and many more, tools the model can call, and create_agent, which runs the model-calls-tools loop until the job is done. LangChain's documentation describes create_agent as "a minimal, highly configurable harness". A complete agent on LangChain 1.4:

from langchain.agents import create_agent

def order_status(order_id: str) -> str:
    """Look up the delivery status of an order."""
    return f"Order {order_id} is out for delivery."

agent = create_agent(
    "anthropic:claude-sonnet-4-6",
    tools=[order_status],
    system_prompt="You answer questions about orders.",
)
agent.invoke({"messages": [{"role": "user", "content": "Where is order 4711?"}]})

Change the model string to openai:... or ollama:... and the same agent runs on another provider: that independence is most of what the framework layer is for.

What is LangGraph?

LangGraph is "a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents", in its own documentation's words. A run is a graph of nodes that update a shared state, and the runtime adds three things production needs: every step is saved to a checkpoint keyed by thread, so a run survives a restart; output streams as it happens; and a run can stop at an interrupt and wait, for minutes or days, until a person decides. Its strength is mixing plain code with model calls. Here one Python node routes a message and the checkpointer keeps the thread:

from langgraph.graph import StateGraph, MessagesState, START, END
from langgraph.checkpoint.memory import InMemorySaver

def route(state: MessagesState):
    text = state["messages"][-1].content.lower()
    team = "billing" if "refund" in text else "support"
    return {"messages": [{"role": "ai", "content": f"Routed to {team}."}]}

builder = StateGraph(MessagesState)
builder.add_node(route)
builder.add_edge(START, "route")
builder.add_edge("route", END)
graph = builder.compile(checkpointer=InMemorySaver())

graph.invoke({"messages": [{"role": "user", "content": "I want a refund"}]},
             {"configurable": {"thread_id": "customer-4711"}})

InMemorySaver forgets everything when the process restarts; production needs a database-backed saver, covered in our guide to debugging LangGraph checkpointers.

What is Deep Agents?

Deep Agents is an agent harness: the same tool-calling loop as create_agent, with the equipment for long jobs attached. Its package description puts the stack plainly: "LangGraph is the graph runtime. LangChain's create_agent is a minimal agent harness on top of it. Deep Agents is a more opinionated harness on top of create_agent." In version 0.7 a new deep agent gets file tools (ls, read_file, write_file, edit_file, delete, glob, grep), a task tool that hands work to subagents, and summarisation as the conversation nears the model's context window. An execute tool appears when the backend can run commands; skills, memory files and approval interrupts switch on when you pass them.

from deepagents import create_deep_agent
from langchain.agents.middleware import TodoListMiddleware

agent = create_deep_agent(
    model="anthropic:claude-sonnet-4-6",
    tools=[order_status],
    system_prompt="You resolve order problems end to end.",
    middleware=[TodoListMiddleware()],  # planning is opt-in since 0.7
)

Note the last line: since Deep Agents 0.7 the write_todos planning tool is no longer in the default stack, so tutorials written for earlier versions describe an agent that plans by default. The rest of what the harness does, and leaves to you, is in LangChain Deep Agents in production.

Is LangChain built on top of LangGraph?

Yes, since LangChain 1.0 (October 2025). create_agent returns a compiled LangGraph graph, so a LangChain agent takes a LangGraph checkpointer, streams in LangGraph's modes and stops at LangGraph interrupts. Deep Agents calls create_agent in turn: LangGraph runs it, LangChain shapes the agent, Deep Agents equips it. LangChain's comparison page adds that you do not need to know LangGraph to use LangChain. One trap in older tutorials: LangGraph's prebuilt create_react_agent is deprecated since LangGraph 1.0, and its warning points to from langchain.agents import create_agent.

Which is better, LangChain or LangGraph?

Neither, because they do different jobs and you use LangGraph either way. LangChain is better when the job is one agent calling tools: less code, the standard loop, ready middleware. LangGraph is better when you need control over the order of steps, such as a workflow that must always validate before it posts. LangChain's documentation suggests Deep Agents for a batteries-included agent, create_agent for a customisable harness, and LangGraph for "advanced needs combining deterministic and agentic workflows".

Where LangSmith fits

LangSmith is not a fourth library. It is LangChain's platform for tracing, evaluation, prompts and deployment, and it works with agents built on any of the three layers. Tracing is switched on with environment variables and sends each run, full conversation included, to LangSmith; LangSmith Deployment hosts an agent as a managed service, in LangChain's cloud or your own infrastructure. The libraries run without either. Olano does not switch LangSmith on, so conversations stay inside the customer's deployment; our guide to debugging LangChain agents covers traces and local alternatives.

Which do you need? A decision table

Start at the highest layer that fits; drop down only for control.

The jobStart withWhy
Sort incoming email into five foldersA LangChain chat model, no agentOne model call with structured output; a loop only adds cost.
A shop assistant answering order questions with a few toolsLangChain create_agentThe tool-calling loop is the whole job. Add a persistent checkpointer for memory.
Invoices: extract fields, match the purchase order, route to an approver, post to accountingLangGraphThe steps are fixed and must be auditable. Only extraction needs a model.
Read 40 supplier documents and write a comparison reportDeep AgentsNotes go to files, subagents read in parallel, summarisation keeps the session going.
Write and run code, or convert filesDeep Agents with a sandbox backendexecute appears only with a backend that runs commands; a sandbox keeps them off your host.
A process that waits two days for a manager's sign-offAny layer, with a database checkpointerAll three share LangGraph's interrupts; the saved state must survive the wait.
A customer-facing WhatsApp agent, with staff approving refundsDeep Agents or create_agent, plus a platformThe libraries do not connect to WhatsApp, run an approvals inbox or hold credentials.

One WhatsApp message through all three layers

A customer writes: "Can you move my delivery to Saturday and refund the express shipping?" Here is who does what inside an Olano agent.

WhatsApp message inOlano finds the agent and threadLangGraph loads the checkpointDeep Agents prepares context and a planLangChain calls the model and toolsLangGraph pauses for the refundA person approves; the reply goes back
StepWhat happensWhich layer
1. ArriveOlano checks the sender and finds the agent and conversation thread the message belongs to.Olano. None of the libraries talks to a messaging channel.
2. LoadThe thread's latest checkpoint is read: earlier messages and any summary of older turns.LangGraph's checkpointer, on the database Olano runs for it.
3. PrepareSkills and memory are added; older turns are summarised if the thread passed the compaction point (85% of the model's window by default).Deep Agents, under a policy Olano sets.
4. PlanThe model writes a to-do list: change the date, then refund the fee.Deep Agents' planning tool, model reached through LangChain.
5. ActThe model calls the order lookup and the delivery change, run with this agent's stored credentials.LangChain tool calling; tools and vault are Olano's.
6. WaitA refund involves money, which Olano's default approval profile always holds. The run stops and the request appears in the dashboard's Approvals list.LangGraph interrupt; approval rules and inbox are Olano's.
7. ReplyOnce someone approves, the run resumes from the checkpoint and the reply goes back on WhatsApp. With no decision within the configured time (five minutes by default), the refund does not run.LangGraph resumes, LangChain calls the model, Olano delivers.

The pattern generalises: LangGraph owns state and time, LangChain owns talking to the model, Deep Agents owns how the agent works through a job, and everything touching the outside world sits outside all three.

Common mistakes

  • Hand-building the agent loop in LangGraph. "Call the model, run its tools, repeat" already exists as create_agent, and it is still a LangGraph graph. Write raw LangGraph for the parts that are not that loop.
  • Using Deep Agents when one tool-calling agent is enough. The harness adds file tools, a subagent tool and their instructions to every request: worth it for a long job, overhead for a lookup bot.
  • Forgetting the checkpointer, or using the in-memory one in production. Without one, each call starts from nothing and an approval has nothing to resume from. With InMemorySaver, the next deploy erases every thread.
  • Assuming a deep agent writes to disk. The default backend keeps files in the thread's state, invisible to other threads, and there is no shell until the backend can run commands.
  • Copying a tutorial from another version. Planning became opt-in in Deep Agents 0.7; create_react_agent gave way to create_agent at 1.0.
  • Treating LangSmith as part of the library. It is optional, and switching tracing on sends full conversations out of your environment. Decide that deliberately with customer data.

How Olano helps

Olano runs all three layers for you. Every Olano agent is a LangChain agent: LangChain for the models, LangGraph for durable, resumable runs, Deep Agents for planning, files and subagents. We add what the libraries leave out: managed model tiers or your own keys per agent, encrypted checkpoints in production storage, an isolated container for each agent's tools on managed deployments, 15+ messaging channels, an Approvals inbox whose riskiest rules hold even in automatic modes, a per-agent credential vault, and schedules and Cortex for unattended work. See how Olano is built on LangChain and the Olano platform.

The limit: Olano agents are configured in a dashboard or by chat, not programmed in Python against these libraries. If the agent code is your product, build on the libraries directly.

FAQ

Do I need to learn LangChain before LangGraph?

No. LangGraph's documentation says you do not need LangChain to use LangGraph. Most LangGraph examples use LangChain's model and tool interfaces, though, so those basics help, and LangChain recommends its higher-level agents if you are new to building them.

Is LangGraph still relevant?

Yes. LangGraph 1.0 shipped in October 2025 alongside LangChain 1.0, and both LangChain's create_agent and Deep Agents compile to LangGraph graphs, so every agent built with either runs on it. Releases continue: 1.2.15 was published on 12 October 2026. What changed is that the ready-made agent loop moved up into LangChain, so you write a raw graph only where you need custom control.

Who owns LangGraph?

LangGraph is built and maintained by LangChain, Inc., the company behind LangChain, Deep Agents and LangSmith. The library is open source under the MIT licence.

Is LangSmith required to use LangChain or LangGraph?

No. LangSmith is a separate platform for tracing, evaluation and deployment. The open-source libraries run without it, and tracing is on only when you set it up. Olano does not switch it on.

Does Deep Agents replace LangGraph?

No, it runs on it. A deep agent is a LangChain agent, which is a LangGraph graph, so checkpointers, streaming and interrupts all come from LangGraph. You can even pass your own compiled LangGraph graph to a deep agent as a subagent.

Related reading

The rest of the LangChain series, and where to go next.

Checked 16 October 2026 against the packages Olano pins (LangChain 1.4, langchain-core 1.6, LangGraph 1.2, Deep Agents 0.7.23), by running each code sample, and against LangChain's documentation (frameworks, runtimes and harnesses, the LangGraph, LangChain and Deep Agents overviews) and the PyPI release history. Olano is an independent company that builds on LangChain's open-source libraries; it is not affiliated with or endorsed by LangChain, Inc. Library behaviour changes between releases; LangChain's documentation is the primary source. If we have described something wrongly, write to support@olano.ai and we will correct this page.

Want all three layers without running them?

Tell us what your agents need to do. We will tell you which layer the job needs, and whether Olano should run it or you are better off on the libraries directly.

Discuss a project