Quick Answer: LangChain vs LangGraph comes down to layer: LangChain is the high-level agent framework, while LangGraph is the lower-level runtime its agents run on. Use LangChain's
create_agentfor a model calling tools in a loop, and drop to LangGraph for explicit branching, checkpointed state or human approval steps, per LangChain's docs on 28 September 2026.
The LangChain vs LangGraph question used to be a fork in the road. Not anymore. LangChain rebuilt its agent abstraction on top of LangGraph, both come from the same company, and you can move between the two layers without starting over.
The real decision is how much control flow you hand to the model. This guide answers it for agents that must survive restarts, wait for approvals and leave a record a reviewer can read.
What is the difference between LangChain and LangGraph?
LangChain is an agent framework: models, tools, integrations and a ready-made agent loop. LangGraph is the orchestration runtime under it, where you define nodes, edges and state yourself and get durable execution, persistence and human-in-the-loop.
LangChain Inc builds both. It shipped LangChain in October 2022 and LangGraph in January 2024, then rebuilt create_agent on LangGraph because production agents need its primitives. Its own comparison of Deep Agents, LangChain and LangGraph calls LangGraph the runtime, LangChain the framework and Deep Agents a third, higher layer: a harness.
So among the frameworks used for production agent workflows, these two are one stack, and you pick a layer rather than a vendor. For options outside this stack, see our guide to AI agent frameworks for production.
| Capability | LangChain (create_agent) |
LangGraph |
|---|---|---|
| Prebuilt agent loop (model calls tools until done) | Yes | No (you define the graph) |
| Deterministic steps mixed with model steps | Yes (middleware hooks around the loop) | Yes (any graph shape) |
| Checkpointed state and resume | Yes (inherits LangGraph persistence) | Yes (checkpointers and stores) |
| Human approval before a tool runs | Yes (human-in-the-loop middleware) | Yes (interrupts anywhere in a node) |
| Tracing in LangSmith | Yes | Yes |
| Usable without the other package | No | Yes |
Capabilities as documented by each vendor on 28 September 2026; each source is linked in the sections below.
Choose LangChain when one model calling tools in a loop describes the job. Choose LangGraph when the process has a shape you must control step by step.
Which projects need nothing more than LangChain?
Most single-agent projects: one model calling a handful of tools in a loop until the task is done. Support assistants, document Q&A and tool-calling helpers that finish inside one session rarely need a hand-drawn graph.
LangChain's own example is a docs Q&A bot. The agent searches a vector store, and the loop runs until the answer is good enough. create_agent supplies the loop, and the integrations let you swap the model or vector store without touching the rest.
Middleware covers the deterministic pieces teams add later, such as summarizing a full context window or pausing before a sensitive tool call. The human-in-the-loop middleware lets a reviewer approve, edit, reject or respond to a proposed action.
Typical fits: an order-status support assistant, a Q&A agent over policy docs, or a helper that files tickets. With a checkpointer and a thread_id, the agent still persists through LangGraph underneath.
When do you need LangGraph's state and control flow?
When the process has a shape the model shouldn't decide: fixed steps mixed with model-driven ones, branches and loops you define, retries around flaky systems, or waits that last hours or days.
The LangGraph overview describes a low-level runtime for long-running, stateful agents that mixes hand-coded steps with LLM-driven steps in one graph. LangChain's example is a rental application pipeline where a model extracts the data, plain code scores it and borderline cases go to a person.
Signals you've outgrown a single loop
- An auditor expects the same steps in the same order on every run.
- You branch on business rules, not on the model's judgment.
- A step waits on a person or an outside system longer than a request lives.
- You need to retry one step without rerunning the whole job.
- Several specialized agents must hand work to each other.
Multi-agent orchestration is where LangGraph earns its keep, since you decide in code which agent runs next and what state each one sees, though LangChain's multi-agent docs note that one well-equipped agent often does the same job. Teams that would rather hand orchestration to a partner can compare firms that build multi-agent systems.
How do they compare for debugging, persistence and human review?
They share the same machinery, because LangChain agents run on LangGraph. LangChain exposes persistence and approvals through a checkpointer argument and middleware, while LangGraph lets you place them anywhere in the graph.
Persistence
The LangGraph persistence docs describe two systems. Checkpointers save each thread's state for continuity, approvals, time travel and fault tolerance. Stores hold long-term data across threads. In-memory savers lose every checkpoint on restart, so the docs point to PostgresSaver for production.
Human review
In LangChain, the approval policy sits in middleware and applies to tool calls. In LangGraph, you call interrupt() anywhere in a node. State is saved, the run waits indefinitely, and a Command on the same thread_id resumes it.
Debugging
Both trace into LangSmith once you set LANGSMITH_TRACING=true. Checkpoints are a second record: time travel replays a thread from an earlier state, so you can see where a run went wrong.
How do you move a LangChain agent to LangGraph?
Incrementally. Drop the existing LangChain agent into a LangGraph workflow as one node, then pull the steps that should be deterministic into their own nodes. LangChain documents composition in both directions, so nothing forces a rewrite.
- Mark each step of the process as plain code, model-driven or a human decision.
- Define the state: a typed schema of what each step reads and writes.
- Map steps to nodes:
create_agentbecomes one node, scoring and validation become plain functions. - Turn rules the prompt used to carry, such as "escalate if the score is low", into conditional edges.
- Compile with a persistent checkpointer and give every run a
thread_id. - Add interrupts at approval points and test resuming after a crashed process.
- Trace a few dozen real runs against the old agent before switching traffic.
Which option fits a regulated or self-hosted deployment?
Either one, since both are open-source Python and JavaScript libraries that run in your own environment. Fit depends on where the model, the checkpoint database and the traces live, and on how explicit your approval steps are.
Use this checklist in your security review:
- Model location. LangChain integrates Ollama for open-weight models run locally, next to hosted providers. Decide which steps may call a hosted model.
- State location. Checkpoints hold full messages and tool results. Keep the Postgres checkpointer inside your network and prune on a schedule.
- Trace location. Hosted LangSmith receives your traces. Self-hosted LangSmith runs in your own AWS, GCP or Azure account as an Enterprise add-on, or you can use your own logging.
- Approval points. Every tool that writes, pays, deletes or contacts a customer gets an interrupt or a middleware policy.
- Audit trail. Decide what a reviewer reads, checkpoint history, traces or both, and how long you keep each.
- Operator. Runtime, database, model serving and tracing are four systems. Name who runs each: your platform team, a managed service or a partner.
What mistakes should you avoid when picking LangChain or LangGraph?
- Drawing a graph for a simple loop. A graph you don't need is still code you maintain, and old checkpoints you never prune still cost storage and latency.
- Shipping with an in-memory checkpointer. It passes every demo and loses every paused approval on the first restart.
- Keeping business rules in the prompt. If a rule must hold every time, make it an edge, not a sentence the model may ignore.
- Skipping version pins. Pin
langchainandlanggraph, read the changelog before upgrades, and check the date on any tutorial, since many predatecreate_agent.
How Origins AI approaches production agents
Origins AI (originshq.com) is an AI-augmented engineering company that designs and ships production-ready AI workflows and agents for product teams. The FAQ on its AI workflow development services page lists LangChain in its stack, alongside TensorFlow, PyTorch and Kubernetes, and names AI agent deployment as a service.
The AI Agents product page from Origins AI describes a voice agent in which OpenAI or local LLMs orchestrate intent, memory, tools and guardrails, answers come from a Pinecone or Chroma knowledge base, and calls transfer to a human in real time. The page lists audit logs, PII redaction options and local models where data residency matters.
On security, Origins AI reports encryption at rest and in transit, secure authentication, continuous monitoring and least-privilege data handling. Engagements run as dedicated AI teams, project-based contracts, time-and-materials work or build-operate-transfer.
Talk to an engineer
Building a production agent and stuck on the framework choice? Bring your security checklist answers and book a call with an engineer.
Written by Apoorva Kumar, Co-Founder & CEO, Origins AI.


