LangGraph vs LangChain: What Changed

Updated May 2026
LangGraph and LangChain are complementary tools from the same organization, not competitors. LangChain is the integration layer that connects to LLM providers, vector stores, and tools. LangGraph is the orchestration layer that controls workflow logic through stateful directed graphs. LangChain deprecated its AgentExecutor in late 2025 and now recommends LangGraph for all agent workflows, marking a fundamental shift in how the ecosystem approaches agent development.

The Detailed Answer

The confusion between LangGraph and LangChain is understandable because both come from the same organization, both are used for building AI applications, and LangGraph builds directly on LangChain's foundations. The key distinction is that LangChain handles integration (connecting to models, tools, and data sources) while LangGraph handles orchestration (controlling the flow of work between those integrations).

Think of LangChain as the set of adapters that let you talk to different services, and LangGraph as the workflow engine that decides when and how to use those adapters. You typically use both together: LangChain to set up your model connections and tool definitions, and LangGraph to define the graph that orchestrates them.

Why did LangChain deprecate AgentExecutor?
AgentExecutor was LangChain's original approach to running agents. It implemented a simple think-act-observe loop where the agent would reason about what to do, take an action, observe the result, and repeat. This loop worked for basic agent tasks, but it could not express complex patterns like conditional branching, parallel execution, human-in-the-loop approval, or persistent state management. As production requirements grew more sophisticated, AgentExecutor's limitations became a bottleneck. LangGraph's graph-based architecture removed all of these limitations, making AgentExecutor redundant. The deprecation in late 2025 was a formal acknowledgment that graph-based orchestration had superseded the simple loop model.
Do I still need LangChain if I use LangGraph?
In most cases, yes. LangGraph provides the workflow orchestration, but it relies on LangChain's model abstractions and tool interfaces for connecting to external services. When you define an LLM call within a LangGraph node, you typically use LangChain's ChatModel interfaces. When you define tools, you use LangChain's tool decorator or StructuredTool class. It is technically possible to use LangGraph without LangChain by calling model APIs directly within your nodes, but this bypasses the extensive integration library that LangChain provides and is not the recommended approach.
Is LangGraph replacing LangChain?
No. LangGraph is replacing LangChain's agent orchestration functionality (AgentExecutor), not LangChain itself. LangChain continues to evolve as the integration and utility layer, providing model connections, vector store integrations, document loaders, retrieval tools, and other building blocks. LangGraph is layered on top of LangChain, handling the orchestration that LangChain's linear chain model could not support. Both frameworks are actively maintained and developed by the same team.
Should I migrate from LangChain agents to LangGraph?
If you are currently using LangChain's deprecated AgentExecutor or initialize_agent patterns, migrating to LangGraph is recommended. The deprecated patterns will eventually be removed, and they lack the state management, checkpointing, and control flow capabilities that LangGraph provides. The migration involves translating your agent's logic from the implicit think-act-observe loop into an explicit graph structure, which typically results in clearer, more maintainable code. LangChain's documentation provides migration guides with before-and-after examples for common agent patterns.

The Historical Context

LangChain launched in late 2022 and quickly became the most popular framework for building LLM applications. Its chain-based architecture, where processing steps are linked in a sequence, made it easy to build RAG pipelines, summarization tools, and simple agents. As the LLM ecosystem matured, the demand for more complex agent behavior grew beyond what chains could express.

LangGraph was introduced as a separate library that could handle the complex orchestration patterns that chains could not. Rather than replacing LangChain's core value (integrations), LangGraph added a new layer on top (orchestration). The 1.0 release in October 2025 formalized this separation of concerns, with LangChain providing the building blocks and LangGraph providing the control flow.

How They Work Together

A typical LangGraph application uses LangChain in three ways. First, for model setup: LangChain's ChatOpenAI, ChatAnthropic, or other model classes configure the LLM connection with API keys, model parameters, and retry settings. Second, for tool definition: LangChain's tool decorator and StructuredTool class create tool schemas that models understand. Third, for retrieval: LangChain's vector store integrations, document loaders, and retriever classes handle the data access layer.

LangGraph handles everything else: defining the workflow graph, managing state transitions, routing between nodes, persisting checkpoints, and coordinating multi-agent communication. The orchestration logic lives entirely in LangGraph, while the integration logic lives in LangChain.

The Quick Heuristic

A practical way to think about it: start with LangChain for connecting to models and tools. Use LangGraph when you need workflow control that goes beyond a linear sequence, including branching, looping, human-in-the-loop, persistent state, or multi-agent coordination. Add LangSmith when you need observability and evaluation for production workloads. Use LangGraph Studio when you want visual debugging during development.

If your application is a straightforward RAG pipeline or a simple question-answering system with no complex flow control, LangChain alone may be sufficient. But if your application involves any kind of agent behavior, meaning autonomous decision-making, tool calling, or multi-step reasoning, LangGraph is the recommended runtime.

Key Takeaway

LangGraph and LangChain serve complementary roles: LangChain handles integrations, LangGraph handles orchestration. Most applications use both. LangGraph replaced LangChain's agent orchestration (AgentExecutor), not LangChain itself.