In plain words
A loop repeats a process until a stopping condition is met. An agent loop commonly alternates between a model deciding on an action, software executing it, and the model receiving the result.
A closer look
The important ingredient is feedback. A failed search can trigger a better query; a test failure can trigger a code revision. The harness carries state between iterations and determines which actions are available. Loop engineering focuses on making these cycles productive through checks, retries, useful feedback, and clear exit conditions.
An agent loop is different from a training loop, which updates parameters from a learning signal. Most tool-using agent loops perform repeated inference with unchanged model weights. “Human in the loop” means a person participates at one or more points, for example to review a consequential action.
In practice
A coding agent edits a function, runs tests, reads the failure, revises the function, and tests again. It stops when the required checks pass or a defined limit or blocker is reached.
A useful distinction
Repeating a prompt does not guarantee improvement. Without new evidence, a useful evaluation signal, or a stopping rule, a loop can repeat the same mistake while consuming time and resources.