An agent is a loop. A model chooses an action, a tool carries it out, and the result feeds back into the next choice.
Approach | Who picks each step | Example |
|---|---|---|
Single prompt | Nobody: one input gives one answer. | Draft a paragraph from a fixed brief. |
Fixed script | The author, ahead of time: steps run in a fixed order. | Lint, then compile, then report, every night. |
Agent loop | The model, at run time: each result shapes the next choice. | Read a failure log, then decide which check to run. |
Lesson | What it covers |
|---|---|
Single prompts and fixed scripts compared with a choosing loop. | |
Read, choose, run, record: the four events and the step budget. | |
Model, tools, memory and state, goal, and stopping rule. | |
A runnable loop with a fake decision function and two fake tools. | |
Fixed steps, cost arithmetic, and when to skip the loop. |
No. The model chose nothing after the first call, and no result shaped a later choice. It is a single prompt followed by a fixed script.