Decoder. plain-English AI glossary

Agent Loop

● Core

The heartbeat of an agent — think, act, observe, repeat, until the task is done.

Think of it like

Cooking from a recipe: read a step, do it, check the pot, decide the next step, and keep going until it’s served.

Example

An agent reads a bug report, runs the tests, sees them fail, edits a file, reruns the tests, and loops until they pass.

How it actually works

Each turn the model gets the current context, decides on an action, the action runs, and its result is appended before the next turn. This loop is where all the agent’s power and all its danger live — it can chip away at a long task, or it can spin forever, repeat a mistake, or blow the budget. Good agents have exit conditions and step limits baked in.

For product teams

The core mechanic to understand — capability, cost, and runaway risk all come from this repeat.

For engineers

A control loop that appends each action’s observation to context and re-invokes the model until a stop condition.

Related

Read anything AI without the jargon

Look up any term in plain English, or save terms as you read with the free Chrome extension.

Open DecoderAdd to Chrome