v9.1.1
Menu

Chapter 7: Workflow Patterns & LangGraph Stateful Graphs

PROWeek 7-8

Anthropic's canonical workflow taxonomy — chaining, routing, parallelization, orchestrator-worker — and LangGraph's stateful-graph runtime that operationalizes them at scale, complete with checkpointing, human-in-the-loop, and resumable execution.

Topics
6

Chapter Overview

Most production LLM systems are workflows, not agents. Anthropic's Building Effective Agents essay (Dec 2024) catalogued the four patterns nearly all LLM apps reduce to. LangGraph (LangChain Inc., 2024) is the leading runtime for these patterns — a stateful graph engine with first-class support for checkpointing, conditional edges, and human-in-the-loop pauses.

This chapter is split: half is taxonomy (which workflow when), half is the practical runtime (how LangGraph implements them).

This chapter covers:

  • Anthropic workflow patterns — the canonical taxonomy
  • Prompt chaining — sequential decomposition with explicit gates
  • Routing & parallelization — fan-out/fan-in patterns
  • Orchestrator-worker — planner emits a fixed-shape plan; workers execute
  • LangGraph stateful graphs — typed state, conditional edges, the runtime
  • Checkpointing & resuming — durable execution and human-in-the-loop pauses

Chapter Roadmap

Click any topic to jump in

1
The 4 Patterns

Anthropic's taxonomy: chaining, routing, parallelization, orchestrator-worker.

Three of the four patterns expand here

From the taxonomy to the implementations

2
Prompt Chaining

Sequential decomposition with programmatic gates between steps.

3
Routing & Parallel

One classifier picks the path, or many handlers run concurrently.

Two ways to express larger compositions
4
Orchestrator-Worker

Planner emits a fixed-shape plan; stateless workers execute in parallel.

5
LangGraph

The runtime: typed state, conditional edges, durable execution.

What ties everything together for production
6
Checkpoints & HITL

Durable execution and human-in-the-loop pauses for sensitive operations.

PRO

Sign up to unlock this chapter

This chapter is part of PixelBank Premium. Create a free account, then upgrade to read the full lesson — concepts, walkthroughs, and exercises.