A single prompt sends one input and returns one answer. Any follow-up is a fresh request unless the caller re-attaches the history.
Prompts are stateless between calls. Whatever the model is not shown again, it no longer knows.
A workflow script runs steps in a fixed order. It may call a model at fixed points, but results never change which step runs next.
Scripts are predictable and cheap to reason about. A new case needs a new branch written by the author.
An agent reads the goal and the current state, then picks the next action. Tool results update the state, so the path differs per run.
That freedom is the whole difference. A script encodes the path; an agent discovers it one choice at a time.
Approach | What varies at run time | Where it breaks |
|---|---|---|
Single prompt | Nothing beyond the wording of the answer. | Multi-step tasks need several calls with memory. |
Fixed script | Data values, not step order. | A case the author never coded takes the wrong branch. |
Agent loop | The step sequence itself. | A wrong early choice compounds into later steps. |
Script. The step order is fixed and no result changes it; the model is a fixed stage, not a chooser.
Ask whether a tool result can change which step runs next. If yes, there is an agent loop; if no, it is a script.