TechPrep
Production AI systemsReadPracticeCheck

Agent orchestration: workflows before agents

Use the simplest composition that works: a single call, a fixed workflow, and only then an autonomous agent loop with limits.

Anthropic's engineering post Building effective agents draws a useful line: workflows are LLM calls orchestrated through predefined code paths; agents are systems where the model directs its own process and tool use. It recommends finding the simplest solution and adding complexity only when it demonstrably improves results (official, see sources).

PatternShapeUse when
Prompt chainingFixed sequence of calls, each checking or transforming the lastThe task splits cleanly into steps
RoutingClassify the input, send it to a specialised prompt or modelDistinct request types with different handling or cost
ParallelisationRun sections or votes concurrently, then aggregateIndependent sub-tasks, or you want several opinions
Orchestrator-workersOne call plans sub-tasks, workers do them, orchestrator mergesSub-tasks cannot be known in advance
Evaluator-optimiserOne call drafts, another critiques, loop until good enoughClear quality criteria and iteration helps
Autonomous agentModel loops: think, call tool, observe, until doneOpen-ended tasks where steps cannot be predicted

What production agents need

Your distributed-systems background maps directly: an agent harness is a stateful, long-running workflow with unreliable steps. Durability, idempotency, timeouts and observability are the same problems with a model in the loop. Say that in interviews.

Practice

Written for this site to drill the lesson. Not reported interview questions.

  1. Design an agent that triages failing CI builds and opens a fix PR. Where are the human checkpoints, and what are its budgets?
  2. A support agent sometimes loops forever calling search. Name three mechanisms that stop it, and how you would detect it in production.
  3. Turn an "autonomous research agent" proposal into a workflow. What do you lose and gain?

Check yourself

What is the difference between a workflow and an agent, in Anthropic's terms?

Workflows follow predefined code paths; agents let the model direct its own process and tool use.

Name four things a production agent harness needs.

Any four of: budgets, durability/checkpoints, observability/tracing, human approval for irreversible actions, sandboxing, error recovery, context management.

Sources

Saved in this browser.