
Loop
A loop is a workflow pattern in which an AI system doesn't complete a task in a single step but breaks it down into sub-steps, checks the result of each step, and then decides whether to continue or stop. This principle underlies modern AI agents that can plan, act, and self-correct autonomously.
Many AI systems operate in loops. This means: the system performs an action, looks at the result, and then decides what comes next. This sequence repeats until the task is completed or the system determines it cannot proceed further. This sounds simple, but it marks a fundamental difference from a chatbot that simply answers a question and then waits. A system operating in a loop acts actively—it plans, checks, and corrects itself.
Why loops fundamentally change AI systems
A classic language model receives a question and gives an answer. Once. That’s it. For complex tasks, this isn’t enough. A task like “Research three competitors and summarize their prices” has many sub-steps: searching, reading, comparing, writing. No single step accomplishes all of this.
Loops make it possible for an AI system to handle exactly this on its own. It breaks the task down into steps itself, executes them in sequence, and checks progress along the way. This gives rise to something qualitatively new: a so-called AI agent, i.e., a system that acts autonomously across multiple steps. Without a loop, there is no true agent.
The economic value behind this is significant. Tasks that would previously have required a human—because they consist of many small decisions—are increasingly becoming automatable. This is why companies are currently investing heavily in agent-based systems that rely on loops.
Structure of a typical loop
The classic sequence follows a fixed scheme often referred to in research as “Reason-Act-Observe.” First, the system considers which step makes sense next. Then it executes this step—for example, a web search, a calculation, or writing a text. Afterward, it reads the result and decides whether the task is complete or a new round begins.
This process is intentionally kept open-ended. The system doesn’t know at the outset how many rounds it will need. It might be finished after two steps or after twenty. This is precisely the difference from a simple script that rigidly works through a fixed sequence: a loop reacts to what it encounters.
A well-known problem here is the so-called infinite loop. The system goes in circles because it fails to recognize its own failure and repeats the same unsuccessful action over and over. Good systems therefore have a termination condition: a maximum number of steps or an evaluation logic that detects when no further progress is being made.
Loops in products and headlines
When media report on “AI agents” that autonomously browse the internet, write code, or answer emails, there is almost always a loop behind it. Products like Operator from OpenAI or Devin, an AI system for software development, are publicly known examples. Devin receives a programming task and works through it in a loop: writing code, testing, reading errors, correcting, testing again.
Loops are also present in less spectacular applications. Many enterprise tools use them to automatically generate reports, merge data from various sources, or process customer inquiries. The term doesn’t always appear in these contexts—but the underlying pattern is the same.
In expert debate, control over loops is a central topic. The longer a system runs autonomously, the harder it becomes to trace what it did and why. Regulators and safety researchers are therefore discussing at which points a human must be able to intervene in the loop—a concept referred to in English as “human in the loop.”