All Topics

LangGraph

v1.1

The execution engine for agents. State machines, persistence, human-in-the-loop, streaming, and graph-based control flow.

0/25
What is LangGraph?

Nodes, edges, and the state machine model. Why LangGraph over plain chains.

beginner10 min
State: The Agent's Brain

Designing state: TypedDict, Pydantic, reducers, and the add_messages pattern.

intermediate11 min
Nodes

Nodes as functions, async nodes, tool nodes, and the Command API for routing from inside a node.

intermediate10 min
Edges & Routing

Normal edges, conditional edges, path maps, cycles, and add_sequence() for linear flows.

intermediate11 min
create_react_agent (Deprecated)

DEPRECATED in LangGraph v1. Use create_agent from langchain.agents instead — simpler interface, middleware support, and the same LangGraph runtime under the hood.

intermediate9 min
Persistence: Never Lose State

Checkpointers save state after every super-step. InMemorySaver for dev, PostgresSaver for prod.

intermediate10 min
Thread IDs & Multi-Session

Thread IDs isolate conversations. One graph, many users, each with their own state history.

intermediate8 min
Long-term Memory with Store

LangGraph Store is a key-value store that persists across threads and sessions. Use it to remember user preferences, learned facts, and past interactions — things that should survive beyond a single conversation.

intermediate10 min
Time Travel

Replay from any checkpoint, fork-and-rerun, and debugging agent decisions step by step.

advanced9 min
Durable Execution

Auto-persistence of execution state, crash recovery, resumability across server restarts. How LangGraph guarantees exactly-once execution semantics.

intermediate10 min
Runtime & Context: Dependency Injection

The Runtime object and context_schema replace config['configurable'] as LangGraph's dependency injection system — typed access to state, store, context, and stream writer from any node or tool.

intermediate11 min
Encryption, TTL & Checkpointer Backends

Encrypt checkpoints at rest with AES, configure TTL policies for automatic cleanup, and choose from 8 checkpointer backends for production persistence.

advanced10 min
Human-in-the-Loop

Pause execution for human approval, collect user input mid-run, and resume with Command.

intermediate10 min
Streaming v2

Unified StreamPart protocol, type-safe output modes, and real-time token streaming.

intermediate9 min
Pre/Post Model Hooks

Custom logic before/after model calls for context management, guardrails, token tracking.

intermediate8 min
Branching & Conditional Routing

Complex routing logic in LangGraph. Conditional edges with multiple targets, LLM-based dynamic routing, parallel branches with merge, nested conditions, and the router node pattern for specialized sub-graphs.

intermediate10 min
RetryPolicy, Error Taxonomy & CachePolicy

Structured error handling in LangGraph: RetryPolicy for transient failures, error taxonomy for routing errors to the right handler, and CachePolicy for avoiding redundant computation.

advanced10 min
Subgraphs

Compose graphs from smaller graphs. Parent-child state communication, shared keys, and encapsulation.

advanced11 min
Send API & Map-Reduce

Fan out to parallel node executions with Send(), then collect and reduce the results.

advanced10 min
Command API

Edgeless graphs where nodes dynamically choose the next node. Command(goto=, update=). Building flexible agent flows without static edges.

advanced10 min
Deferred Nodes

Nodes that wait for all upstream paths to complete before executing. Essential for map-reduce and consensus patterns. @defer decorator.

advanced9 min
Node Caching

Cache results of individual nodes to skip redundant computation. cache_policy on compile(). Cache invalidation strategies.

advanced8 min
Functional API

Alternative to Graph API using @entrypoint and @task decorators. When to use Functional API vs StateGraph. Simpler syntax for common patterns.

intermediate11 min
Graph API vs Functional API

LangGraph has two APIs: the Graph API (StateGraph with nodes and edges) and the Functional API (@entrypoint + @task). Both share the same runtime. This article helps you pick the right one for your use case.

intermediate8 min
LangGraph Studio

Visual IDE for debugging and interacting with graphs. Real-time state inspection, step-through execution, breakpoint debugging.

intermediate9 min