Skip to content
BENIBIX Learn

LangChain vs LangGraph

People often think LangGraph is just the new name for LangChain, but they are two different tools made by the same team. LangChain gives the parts: links to models, prompts, tools and search, joined in straight chains. LangGraph sets out steps as a graph with loops, saved state and pauses, which is what agents need. Many projects use both.

Development🧬 AI Engineering

LangChain

A free kit of code for making AI apps from chains of steps.

LangChain is a free, open-source framework for building apps on language models. It works in Python and JavaScript. It came out in 2022 and soon became one of the most used LLM frameworks. It gives one shared way to call many model makers, plus parts for prompts, tools, memory and search. Its main idea is the chain, where what one step puts out is what the next step takes in. The same team makes LangGraph for agents and LangSmith for tracing.

Example
Emma builds a ticket tagger in LangChain. A prompt template, a model and an output parser are joined in one chain. It gives back a clean label.
Why it matters
It has a huge set of ready links to models, data stores and tools. So a first version is quick to build.
Full entry
Development🧬 AI Engineering

LangGraph

A free kit of code for making AI agents as a map of steps.

LangGraph is an open-source framework for building agents as a graph of steps. Each step is a node, such as calling the model or running a tool. Edges link the nodes and can loop back, so the agent can repeat a step until a check passes. A shared state object carries the work from node to node and can be saved, so a run can pause for a human and resume later. It comes from the team behind LangChain.

Example
Jack builds a research agent in LangGraph with three nodes: plan, search and write. A loop sends it back to search until it has enough sources.
Why it matters
It gives you clear control of an agent's path, with loops, pauses and saved state. One big loop is much harder to follow.
Full entry

In one line

LangChain
A free kit of code for making AI apps from chains of steps.
LangGraph
A free kit of code for making AI agents as a map of steps.