Skip to content
ML Academy

Introduced on day 49

Agent loop

A control loop in which a language model chooses the next action from the results of earlier tool calls, repeating until it signals completion or a limit stops it.

In detail

Each cycle the model reads the task and the observations so far, emits a tool call or a final answer, and the harness executes allowed calls and returns the results. Because the model decides the sequence, the number of steps, cost and outcome vary between runs. The harness must own the limits: allow-list, step and cost budgets, deadline, repetition check and approval for irreversible actions.