Build resilient
language agents
as graphs.
LangGraph extends the LangChain ecosystem to let you build stateful, multi-actor applications with LLMs. Model complex, cyclic workflows with precision and control.
from langgraph.graph import StateGraph, END
graph = StateGraph(AgentState)
graph.add_node("reason", reason)
graph.add_node("act", act)
graph.add_edge("act", "reason")
graph.add_conditional_edges(
"reason", should_continue,
{ "continue": "act", "end": END }
)
app = graph.compile()01 — What is LangGraph
Beyond chains: agentic runtimes as graphs.
LangChain pipelines are directed acyclic graphs (DAGs) — data flows one way and stops. Real agents need to iterate: call a tool, inspect the result, reconsider, retry. LangGraph adds cycles and state, the two ingredients DAGs cannot express.
LangChain
Directed Acyclic GraphEach node runs once. Cannot revisit a previous step.
LangGraph
Stateful Cyclic GraphNodes loop until a condition resolves. State persists across iterations.
StateGraph
A typed, shared state object that flows through every node. Reducers control how updates merge across steps.
Nodes
Pure functions or LangChain runnables. Each node receives the current state and returns a partial update.
Edges
Static or conditional transitions decide where the agent goes next — enabling loops, branches, and parallel runs.
02 — Documentation
Master agentic development.
Everything you need to go from your first node to a production multi-agent system.
Official Documentation
The full LangGraph reference, conceptual guides, and API.
Getting Started
Build your first stateful agent in under ten minutes.
Core Concepts
Deep dive into StateGraph, nodes, edges, checkpointing, and human-in-the-loop.
Example Notebooks
Production-ready patterns: ReAct agents, multi-agent supervisors, RAG, planning.
03 — Ecosystem
Part of a powerful ecosystem.
LangGraph isn't a fork — it's the orchestration layer of LangChain. Reuse every model, tool, and retriever you already have, and trace each run end-to-end in LangSmith.
Building blocks for LLM apps — models, prompts, retrievers, tools.
Stateful orchestration runtime. Compose runnables into cyclic agents.
Tracing, debugging, and evaluation for every node and edge execution.