AI Agents & Skills

Workflow or agent? 5 patterns from Anthropic for picking the right architecture

TL;DR

Workflows: LLMs and tools follow predefined code paths. Agents: the LLM decides its own next step. Start with the simplest thing that works; add complexity only when it measurably helps. Five common workflow patterns solve most problems before you need an agent.

5 workflow patterns

PatternHowExample
Prompt chainingBreak work into sequential steps with checks in betweenOutline → check → write
RoutingClassify the input, send it to a specialized branchTickets: technical / billing / feedback
ParallelizationRun parts or attempts in parallel, then aggregate/voteReview code on 3 criteria at once
Orchestrator-workersOne LLM dynamically delegates to workersEdits across files not known in advance
Evaluator-optimizerOne LLM generates, another critiques, loopTranslation, rewriting to meet criteria

When do you need an agent?

  • Open-ended problems with an unpredictable number of steps (debugging, research, coding).
  • Environments with clear feedback (tests pass/fail, tool results) so the agent can self-check.
  • You accept higher cost and have guardrails: iteration caps, sandboxes, human checkpoints.