Agent loop
The agent loop is the cycle in which the model chooses an action, the harness executes it, and the result is appended to the history.
The agent loop is the cycle that an agent repeats while it works on a task. On each pass, the model receives the goal and the history so far and chooses an action. The agent harness executes the action, and the result is appended to the history. The model expresses the action as a tool call, and the result returns to the model as text or images.