On this page
Read
The useful mental model
The deciding is the difference. In a workflow, your code fixes the path and the model fills in steps. In an agent, the model chooses the next step from what the last step returned, and repeats until it stops. That freedom suits open-ended problems where the steps cannot be predicted. It costs more time and money and can compound errors, so it needs limits.
In plain English
A workflow is a recipe with fixed steps. An agent is a cook who looks in the fridge, tries something, tastes it, and decides what to do next.
Where builders use it
- 01Open-ended research and investigation
- 02Multi-step coding tasks
- 03Support cases whose steps cannot be listed in advance
Why it matters
Choosing an agent when a workflow would do adds cost, delay, and risk. Choosing a workflow when the steps cannot be known makes the system brittle. Knowing the difference is the first design decision.
Why now
Models plan and use tools better, so agents are practical for more tasks, and providers now publish guidance on loops, tools, and stopping limits. Practices change quickly, so check current guidance before relying on a specific pattern.
A common misconception
“An agent is just a chatbot with tools.”
What makes it an agent is that the model chooses the next step in a loop and checks the result. A fixed sequence of model calls is a workflow, even when it uses tools.
“More autonomy is always better.”
Autonomy trades speed and cost for flexibility, and mistakes can compound. The guidance is to start with the simplest approach and add complexity only when it clearly helps.
See
See the mental model
The visual is generated from the same structured knowledge as the written explanation.
Two columns compare a workflow and an agent. In a workflow, your code fixes the path and the model fills in steps, which is predictable and cheaper. In an agent, the model chooses the next step in a loop, which is flexible but slower and costlier and needs limits.
Builder example
Pick the right amount of freedom
A support team wants a system that handles refund questions. Most cases follow the same three steps, but a few need open-ended investigation.
Failure
The team builds a fully autonomous agent for every case. Simple cases get slower and cost more, and in the hard cases it loops, repeats tool calls, and never stops.
Intervention
Put the predictable path in a workflow: classify, look up the order, apply the policy. Hand only the open-ended cases to an agent with a small set of tools, a maximum number of steps, and a checkpoint where a person can step in.
Observable result
Routine cases run in a fixed number of steps, hard cases get flexible handling within a cap, and every run has a clear stopping point.
Sources
Go deeper
Last researched 12 October 2026