Skip to content
Generative AI

When should you build a workflow instead of an agent?

Whenever the steps are known ahead of time. A fixed sequence of model calls and code is cheaper, faster and testable, and you can see which step broke. An agent earns its loop only when the next action depends on intermediate results.

datasciencetrivia.com

Card 1 of 292. Answer: Whenever the steps are known ahead of time. A fixed sequence of model calls and code is cheaper, faster and testable, and you can see which step broke. An agent earns its loop only when the next action depends on intermediate results.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Build a workflow when you can write the steps down in advance: code fixes the order of model calls and tools, and the model fills in each step. An agent is a model in a loop that picks its next action, a tool call or stopping, from earlier results. Anthropic's 2024 essay "Building effective agents" popularized the split.

Errors compound: at 95% accuracy per step, three steps succeed 86% of the time (0.95³) and ten about 60% (0.95¹⁰), and an agent picks its own step count. It also re-sends its growing transcript each turn: at 2,000 tokens a turn, ten turns send 2k + 4k + … + 20k = 110,000 input tokens. A workflow can test and retry each step alone.

An agent earns its cost when the path is unknowable in advance, such as debugging an unfamiliar codebase. Interviewers then ask about guardrails: step and budget limits, sandboxed tools, human approval for irreversible actions, and logged tool calls. A common confusion: tool calls alone do not make an agent; a workflow can call tools at fixed points.

All questions