Overview
Agentic workflow design patterns are predefined control structures that orchestrate multiple LLM calls toward a goal, in contrast to agents that decide their own path at runtime. A workflow trades flexibility for predictability, lower cost, and easier evaluation, so it is the right default for any task whose steps you can name in advance. This page details the five patterns; the pillar agent-architecture-patterns places them next to the autonomous-agent patterns, and multi-agent covers coordination at scale.
Prompt chaining: decompose into ordered steps
Split a task into a fixed sequence where each LLM call works on the previous output. Add a programmatic gate between steps to catch failures early. Use it when a task cleanly decomposes, such as outline, then draft, then edit. The cost is added latency; the payoff is each step is simpler and more reliable. See prompt-chaining.
Routing: classify, then dispatch
Use a first call to classify the input and route it to a specialized downstream prompt or model. Route simple queries to a cheap model and hard ones to a strong model. Routing works when categories are distinct and a single prompt would compromise on all of them. The risk is a misclassification cascading; validate the route before acting on it.
Parallelization: split or vote
Run multiple LLM calls at once in two shapes. Sectioning splits a task into independent subtasks aggregated at the end. Voting runs the same task several times and takes a majority or a best-of. Parallelization cuts wall-clock latency and raises confidence on judgment calls, at a token-cost multiple.
Orchestrator-worker: decompose at runtime
When subtasks are not known until the input is read, an orchestrator LLM plans and delegates to workers, then synthesizes. This is the flexible cousin of sectioning, used for multi-file edits and open-ended research. The orchestrator must enforce a worker budget so the fan-out stays bounded. See multi-agent.
Evaluator-optimizer: iterate against a rubric
A generator produces output; an evaluator scores it against explicit criteria and returns fixes; the loop repeats until the score passes or a cap is hit. Use it when criteria are clear and iteration measurably improves quality. Pair it with a real eval harness so the rubric is calibrated. See evaluation.
Make outputs parseable and loops bounded
Every pattern needs two guardrails: force each call’s output through a schema so the next stage can consume it, and bound every loop with a step or token budget. See structured-output and the loop mechanics in agent-loop.
Pitfalls
- Reaching for an autonomous agent when a workflow suffices. If you can name the steps, hard-code them.
- Chaining so many steps that error compounds; each gate should be able to fail fast and surface why.
- Running voting or parallelization without a cost cap; the token multiple adds up quickly. See reliable-agents-in-production.
Sources
- Anthropic, “Building Effective Agents” (2024): the five workflow patterns (prompt chaining, routing, parallelization, orchestrator-worker, evaluator-optimizer) and the workflow-versus-agent framing.