Lattice
Skip to content

Agent loop

The control structure where a model decides an action, it is executed, and the result feeds the next turn until the task is done.

By Entry last reviewedmethod

What it implies

Twenty lines, and the least interesting part of an agent system. The engineering is in the host around it: surviving a deploy mid-loop, idempotent side effects, and a hard ceiling on turns and tokens. Prompts are advisory; only the host can stop a loop.

Related terms

Rules of thumb

  • A definition is only useful next to the decision it changes. Read the linked layer to see where this term bites.
  • If a vendor's definition differs from this one, ask what it measures. Marketing definitions rarely name a number.
  • Every optimisation spends latency, memory or quality somewhere. Find out which before you turn it on.

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.