Comparison
AI agent loop vs workflow vs automation
Use a prompt for one-shot work, automation for predictable steps, a workflow for known branches, an agent for tool-using tasks, and a loop for repeated work with verification.

Decision table
| Pattern | Use it when | Do not use it when |
|---|---|---|
| Prompt | You need one draft, answer, or transformation. | The work needs live evidence or repeated repair. |
| Automation | The steps are predictable and inputs are structured. | Judgment or exception handling matters. |
| Workflow | There are known branches and handoffs. | The route changes based on open-ended evidence. |
| AI agent | The system needs tools and can decide next actions. | The task has no clear boundary or approval rules. |
| AI loop | The work repeats until evidence passes or a stop condition fires. | You cannot define a verifier or safe stopping point. |
Rule of thumb
If the job can be finished in one response, use a prompt. If it repeats and needs proof, use a loop.