Part II · Patterns And Practice/Chapter 04
04
Agent And Workflow Patterns
The pattern language: workflow vs agent, prompt chaining, routing, parallelization, orchestrator workers, and evaluator optimizer loops.
The gist
- Workflows buy control. Agents buy flexibility. Hybrids buy both.
- The first question is not "how many agents?" It is "where should control live?"
- Multi agent helps only when specialization improves tools, context isolation, evals, or parallelism.
Module 4: Agent And Workflow Patterns
This is where the common vocabulary lands. Chapter 0b gave the one-sentence version: workflows pick the steps, agents pick their own. This chapter expands that into a pattern language.
Read
Learn the patterns that give this vocabulary its shape:
- prompt chaining
- routing
- parallelization
- orchestrator-workers
- evaluator-optimizer
- a manager agent with specialists as tools
- handoff between specialist agents
- an autonomous loop with stop conditions
The key distinction:
Build by picking five tasks you regularly give agents and labeling each one:
- deterministic workflow
- single agent
- manager plus specialists
- graph runtime
- human in the loop
For each task say what would make it unsafe or too expensive.
Multi-agent is not automatically better. It helps only when specialization improves:
- tool clarity
- context isolation
- evaluation
- parallelism
The first question is not how many agents to use. It is where control should live.