Skip to content

LangGraph (Python)

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.

Install

Terminal window
pip install langgraph langchain-anthropic

Version

v1.1.10 · April 28, 2026 · Python 3.10 – 3.14

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.

Need one specific concept? Land directly on the chapter that owns it.

Every page below is introspected against the installed langgraph==1.1.10 / langgraph-checkpoint==4.0.3 / langgraph-checkpoint-sqlite==3.0.3 / langgraph-checkpoint-postgres==3.0.5 source. If a signature disagrees with an older blog post or docs page, the source wins.

  • Type-safe streaming (v2 API) — opt-in with version="v2" on astream(); yields StreamPart objects with type, ns, data fields (import from langgraph.types).
  • Type-safe invoke (v2 API)ainvoke(..., version="v2") returns a GraphOutput (from langgraph.types) with .value (final state dict) and .interrupts (tuple of interrupt points).
  • Pydantic/dataclass coercioninvoke() auto-coerces input dicts to the declared state type.
  • Python 3.10 – 3.14 support — Python 3.9 dropped in the 1.1 line.
  • Time-travel fixes — replays no longer reuse stale RESUME values with interrupts and subgraphs.
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 →


DateVersionChanges
2026-04-281.1.10Patch release; version card and reference pages updated 1.1.9 → 1.1.10; langgraph-checkpoint updated 4.0.2 → 4.0.3. All key symbols verified against installed 1.1.10 (.routine-envs/main-py-0428).
2026-04-221.1.9Added six source-verified reference pages: StateGraph, Checkpointers, Store, Functional API, Command / Send, Streaming modes. Corrected stale guidance: create_react_agent deprecated in v1.0; from_conn_string is a context manager; ShallowPostgresSaver deprecated.
2026-04-211.1.8Index redesigned into Zero → Hero chaptered tutorial + Jump-to-topic grid; duplicated sections removed.
2026-04-201.1.8Version pin updated to 1.1.8; frameworks.ts metadata aligned.
April 16, 20261.1.6Python 3.9 dropped; type-safe v2 streaming/invoke API; Pydantic/dataclass coercion; Python 3.14 support; time-travel fixes.
November 20251.0.3Node caching; deferred nodes; pre/post model hooks; cross-thread memory; Python 3.13 support.