What is the difference between a workflow and an agent, and why prefer workflows when you can?
Quick-fire answer from the Awesome Generative AI Guide (MIT)
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
A workflow is a predetermined sequence of steps you orchestrate in code (retrieve, then summarize, then classify); the control flow is fixed and predictable. An agent decides its own next step at runtime using the model, which is more flexible but less predictable and harder to test. Prefer workflows when the steps are known in advance because they are cheaper, faster, easier to debug, and easier to guarantee. Use an agent only when you genuinely cannot enumerate the path ahead of time.
Full worked answer
A workflow is a predetermined sequence of steps you orchestrate in code (retrieve, then summarize, then classify); the control flow is fixed and predictable. An agent decides its own next step at runtime using the model, which is more flexible but less predictable and harder to test. Prefer workflows when the steps are known in advance because they are cheaper, faster, easier to debug, and easier to guarantee. Use an agent only when you genuinely cannot enumerate the path ahead of time.
Learn more: Anthropic: Building effective agents
What a good answer covers
- A workflow is a predetermined sequence of steps you orchestrate in code (retrieve, then summarize, then…
- An agent decides its own next step at runtime using the model, which is more flexible but less…
- Prefer workflows when the steps are known in advance because they are cheaper, faster, easier to debug,…
- Use an agent only when you genuinely cannot enumerate the path ahead of time
Key terms: Learn more
In the glossary: Workflow
Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep