Skip to content

LangGraph (Python)

Stateful, graph-based agents for Python — zero to hero with chaptered tutorials and topic-jump references.

GroupMulti-Agent
Current versionv1.2.22
Bonds withPy

Low-level orchestration for stateful, long-running LLM agents. LangGraph models your agent as a graph of nodes and edges with explicit state, durable checkpoints, and first-class human-in-the-loop.

Current version: langgraph 1.2.22 (checked 2026-11-19) · Python 3.10+.

Install

Terminal window
pip install langgraph langchain langchain-anthropic

Best for

Cycles, conditional routing, multi-agent coordination, HITL workflows.

A chaptered tutorial that takes you from a first graph to a production-ready agent. Each chapter has its own page with Next → pagination.

Signatures and behaviour checked against langgraph 1.2.22, langgraph-checkpoint 4.3.2, langgraph-prebuilt 1.1.2, langgraph-checkpoint-sqlite 3.1.3, langgraph-checkpoint-postgres 3.2.1 and langchain 1.5.0. Where a signature disagrees with an older blog post, the source wins.

from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import InMemorySaver
from typing_extensions import TypedDict
class State(TypedDict):
message: str
response: str
def process(state: State) -> dict:
return {"response": f"Processed: {state['message']}"}
builder = StateGraph(State)
builder.add_node("process", process)
builder.add_edge(START, "process")
builder.add_edge("process", END)
graph = builder.compile(checkpointer=InMemorySaver())
result = graph.invoke(
{"message": "Hello"},
config={"configurable": {"thread_id": "user-1"}},
)
print(result)

Ready for the full walk-through? Start Chapter 1 →


Earlier history is in git.

DateVersionChanges
2026-10-251.2.17Checked against langgraph 1.2.17, langgraph-sdk 0.4.9, langchain 1.4.7 and langchain-core 1.7.0 (every block re-run with stub models). Noted the recursion-limit merge fix; the other changes are internal (RemoteGraph stream parsing, PII middleware on streamed tool-call arguments, the tool-call-delta stream event, a new langgraph_sdk.priority module).
2026-10-251.2.16Full API audit against the installed packages: every block run with stub models, and version-history tables rebuilt from the released wheels. Corrected ToolRuntime and ExecutionInfo fields, managed-value limits, the writer parameter rule, NamedBarrierValue semantics, RemoteGraph stream shapes, v3 stream-event claims and the recursion-limit history. Added durable stores (SqliteStore and PostgresStore, TTL sweeps), PostgresSaver.prune, cache backends (SqliteCache, RedisCache), resume-by-id for parallel interrupts, response_schema, per-call HITL options, trace policy in middleware, a FastAPI service with an async Postgres saver, and a type-checked React useStream example.
2026-10-211.2.16Agent chapters moved to create_agent and middleware (Chapter 8 rewritten; create_react_agent documented as deprecated). The single-page comprehensive guide replaced by an API map that links to the chapters; retry/timeout/cache policies documented once, in the StateGraph reference. Chapter 10, the production guide and the performance page rewritten around LangGraph’s own deployment, durability, checkpointer and testing features. Corrected: default recursion limit, ToolNode error-handling default, interrupt behaviour without a checkpointer, InMemoryStore TTL, destinations=, durability placement, error-handler signatures and routing, sync nodes with timeouts, Send from nodes. Removed the advanced-implementations page and merged the managed-values page into the runtime reference.
2026-10-191.2.16Version bump; more runnable examples for channels, ToolNode, MessagesState and Runtime.
2026-04-221.1.9Source-checked reference pages added.
2026-04-211.1.8Index redesigned into a chaptered tutorial with topic links.
2025-111.0.3Initial guide.