Agent Loop
Loop Agen
The repeated cycle of decide, act, observe. Where autonomy actually comes from.
The agent loop is the repeated cycle: the model decides what to do, the harness runs it, the result goes back into the context, and the model decides again. Each pass through the loop is one more model call.
This is the mechanism behind autonomy. A model alone can only produce text; the loop lets that text cause a change in the world, and lets it see the consequence of that change. A well-built loop has a stopping condition, a budget, and a check that the goal is actually met.
Loops also explain the cost profile. An agent that takes twelve tool calls has paid for thirteen model calls. Token spend and latency are functions of loop length, which is why the fastest way to cut an agent's bill is often to cut the number of steps.
Related terms
Agent
A model with tools, a system prompt, and a loop that lets it act and observe results.
Tool Call
The model's request naming a tool and its arguments. Structured output, not a side effect.
Tool Result
What the harness sends back after running a tool: file contents, command output, an error.
Context Engineering
Deciding what goes into the model's context, and what stays out.
Latency
How long you wait. The time to the first token matters more than the total.
Want this working inside your team?
It starts with one conversation about your workflow.