Agent vs workflow
“What is the difference between an agent and a workflow, and why does the distinction matter in practice?”
What this tests
- Clear mental model of who controls the sequence of steps
- Understanding of testability and predictability consequences
- Ability to place real tasks on the right side of the line
- Awareness of hybrid designs (workflows with agentic nodes)
Answers by level
Read the beginner answer first and notice what is missing.
In a workflow the code owns the control flow: the steps and their order are defined ahead of time, and LLM calls are nodes within that graph. In an agent the model owns the control flow: it chooses the next action based on the last result. Both can use tools, both can use retrieval, both can be multi-step; the difference is who decides what happens next. See Workflow State Graph and Single Agent.
It matters because everything downstream depends on it. A workflow is deterministic in shape, so you can unit test each node, cache intermediate results, reason about worst-case cost and latency, and explain a failure by pointing at the node that failed. An agent has a variable number of steps, so testing needs golden datasets and statistical thresholds, cost is a distribution, and a failure can be "it chose the wrong tool on step 7 of 12".
Most production systems are hybrids: a workflow graph where one or two nodes are small bounded agents. That keeps the unpredictable part small and observable.
Green flags · Red flags
- Defines the difference as code-owned vs model-owned control flow
- Explains testability and cost predictability consequences
- Mentions hybrid designs with bounded agentic nodes inside workflows
- Suggests starting with the workflow and escalating only on evidence
- Names concrete metrics such as loop length distribution or cap-hit rate
- Says agents are simply "more advanced" workflows
- Distinguishes them by tool use or by framework
- No mention of testing or predictability
- Defaults to an agent for every multi-step task