All modules
MODULE 05~16% of exam · 50 min read

Agents & Orchestration

Workflows vs. agents, subagents, and building loops that finish.

1 of 5

Workflows versus agents

The most important architectural decision, and the one most often got wrong.

A workflow is a system where LLM calls are orchestrated through predefined code paths. An agent is a system where the model dynamically directs its own process and tool use, deciding what to do next. Both are valid; they suit different problems.

The guidance is unambiguous: use the simplest thing that works. If the steps are known in advance, write a workflow — it is cheaper, faster, deterministic, testable and debuggable. Reach for an agent only when the path genuinely cannot be enumerated ahead of time, and when the value of flexibility outweighs the cost in latency, tokens and unpredictability.

  • Prompt chaining — decompose into fixed sequential steps, optionally with a programmatic gate between them.
  • Routing — classify the input, then dispatch to a specialised prompt or model.
  • Parallelisation — run independent subtasks concurrently (sectioning), or run the same task several times and vote (voting).
  • Orchestrator–workers — a lead model decomposes a task and delegates subtasks to workers.
  • Evaluator–optimiser — one model generates, another critiques, and the loop iterates against clear criteria.
Exam framing

If the question describes a known, repeatable sequence, the correct answer is almost always a workflow — not an agent.

Exam-ready takeaways
  • Workflow = predefined code paths. Agent = model-directed control flow.
  • Prefer workflows; agents buy flexibility at the price of cost, latency and predictability.
  • Know the five composable patterns and when each applies.
divider
Next module · Retrieval & Knowledge Architecture