LangChain / LangGraph

Framework-specific idioms for stateful agents

Framework · OSS5 patterns
In Plain English

This page shows every pattern that LangChain / LangGraph has published or written about — 5 in total. Each one includes a simple picture of how it works, a short explanation, an example of when to use it, and its trade-offs (the good parts and the not-so-good parts).

Reading patterns from one source at a time matters because it lets you see how a single company or team thinks about building AI agents, and compare their ideas side by side. If a pattern here also appears in the bigger Deep Catalogue, you will see a link so you can read the full, detailed version.

An open reference book with a pencil in the fold under warm lamp light

3A.01StateGraph

LANGGRAPH STATEGRAPH Entry Node LLM Node updates state Tool Node side effects Router conditional

LangGraph's core abstraction: a directed graph of nodes (LLM calls, tools, functions) with explicit state passing between them.

Use caseAny agent built on LangGraph.
Trade-offsExplicit, debuggable state · Framework-specific idioms.

3A.02Checkpointer / Persistence

CHECKPOINTER Run Start State Checkpoint Pause / Crash Resume

Persist state between runs so agents can pause, resume, and support human-in-the-loop workflows.

Use caseLong-running workflows, HITL, crash recovery.
Trade-offsResumable agents · Storage overhead.

3A.03LangGraph Human-in-the-Loop

LANGGRAPH HITL Run Interrupt Human Edit Rewind? Resume

Framework primitives for interrupts, edits, and rewinds — built on top of checkpointing.

Use caseWorkflows requiring approval, intervention, or correction.
Trade-offsNative HITL support · Tied to LangGraph idioms.

See 1B.11

3A.04Subgraph Composition

SUBGRAPH COMPOSITION Parent Graph Subgraph A self-contained Subgraph B reusable Plain Node leaf

Graphs nested inside graphs — a whole sub-agent appears as a single node in a parent graph.

Use caseComplex hierarchical systems where sub-flows are reusable.
Trade-offsClean composition · State boundary management.

3A.05Conditional Edges

CONDITIONAL EDGES State Router Fn Edge → Node A Edge → Node B Edge → END

Router functions on edges decide where to go next based on current state — the LangGraph realisation of the Routing pattern.

Use caseState-dependent flow control.
Trade-offsExplicit and testable · Routing logic scatters across edges.

See 1A.03, 1B.07