[ SYSTEM ]
An Agent Does a Task. A Loop Runs the Work.
Most AI pilots produce an answer. A loop observes what happened, decides what to do next, and continues until the work is finished or judgment is required.
2026-07-10 · 8 min read
People keep asking me what I mean by a loop.
The confusion is reasonable. The word is being used for everything from a recurring prompt to a fully autonomous company.
So here is the useful definition: a loop is a bounded system that reads the current state of a piece of work, takes an action, observes the result, and uses that result to decide what happens next.
Then it repeats.
Not forever. Until it reaches a defined outcome, hits a limit, or encounters a decision reserved for a person.
That last sentence is most of the architecture.
A prompt is not a loop
A prompt looks like this: question, then answer. You ask for a summary. The model writes one. The interaction ends.
A scheduled workflow looks like this: clock, then instructions, then output. Every Monday at eight, the system drafts a report. Useful, but still not necessarily a loop. It may perform exactly the same steps next Monday regardless of what happened to the previous report.
A loop looks like this: a goal, then inspect, act, observe, evaluate, and continue, stop, or escalate. The result of one action changes the next action.
That feedback is what closes the loop.
Without it, you have automation. Sometimes excellent automation. But not a system capable of pursuing an outcome.
One running example
Imagine an operations team with customer orders regularly blocked by missing information. People check several systems, work out what is missing, chase the relevant person, check again later, and escalate the oldest cases. The work is repetitive, but every case is slightly different.
"Use AI to manage blocked orders" is not a specification. A loop is.
The job. Reduce the number of customer orders blocked for more than 24 hours.
The trigger. Run when a new order becomes blocked, and recheck unresolved orders every 30 minutes.
The state. For every blocked order, the loop preserves what is blocking it, what has already been checked, who currently owns the problem, which actions have been attempted, when the next action is due, and how confident the system is in its diagnosis. This state matters more than the model. It prevents the system from rediscovering the same problem, contacting the same person twice, or forgetting what happened during the previous run.
The actions. The loop may inspect the order, classify the blocker, retrieve missing internal information, request a document, route the case to an owner, or prepare an escalation. Its authority is explicit. It may send an internal request for missing data. It may not promise a customer a delivery date, issue a refund, change commercial terms, or invent information that is absent from the record.
The observation. After taking an action, it checks what changed. Did the document arrive? Did the order move? Did the owner respond? Was the suspected blocker actually the problem? Has the case exceeded its deadline? The observation is written back into the state.
The decision. The loop now has four choices.
Continue. The diagnosis is sound, but more work remains.
Wait. An action has been taken and the system is waiting for an external event.
Stop. The order is unblocked and the outcome has been recorded.
Escalate. The next action requires judgment, authority, or information the system does not possess.
That is the loop. The AI is one component inside it. The actual system is the operation around the AI: the state, the permissions, the evaluator, the stopping conditions, the escalation rules.
The human is not vaguely "in the loop"
This phrase has become an alibi. A team says a human will remain in the loop, but cannot say which human, at what moment, looking at what evidence, with authority to decide what.
That is not a control. It is a hope.
A real human gate is named. For the blocked-order loop, the gate might be: escalate to the account owner when resolving the case would change price, delivery commitments, or customer terms.
The system reaches that boundary, assembles the evidence, asks for one decision, and waits. The person does not redo the investigation. They exercise the judgment the operation reserved for them. Their decision is then written into the state, and the loop continues.
The minimum specification
Before building a loop, I want nine things written down.
Job. What narrow piece of work does this loop own?
Outcome. What observable condition means the work is complete?
Trigger. What causes the loop to run?
State. What must survive between runs?
Actions. What is the system allowed to do?
Observation. How does it know what happened?
Evaluator. How does it distinguish progress from activity?
Limits. When must it stop trying?
Gate. Which decisions belong to a named person?
If one of these is missing, the pilot will usually compensate with supervision. Someone will repeatedly supply context, notice duplicated work, check the result, correct the system, or decide when it should stop.
The demo may still look intelligent. The operation will remain manual.
The evaluator is the hard part
In software research, success can sometimes be reduced to a test or a number. The system changes something, runs the test, keeps the change if the result improves, and tries again.
Business operations are less polite. A drafted email is not progress because it exists. A routed exception is not resolved because it moved queues. A lead is not qualified because a model assigned it a score. An AI pilot is not valuable because employees used it.
The evaluator has to measure the outcome the operation actually cares about. For the blocked-order loop, that might be the percentage resolved within 24 hours, the median time to resolution, cases reopened after apparent resolution, unnecessary human escalations, and supervision minutes per resolved case.
The model can be changed. The tools can be replaced. The evaluator is what keeps the system pointed at the job.
Start with the almost-automated work
The best first loop is rarely the most ambitious workflow in the company.
Look for work described like this: "We already automated most of it, but someone still has to watch it."
That sentence usually reveals the missing system. The automation performs steps. A person supplies the state, feedback, exception handling, and stopping judgment.
Do not begin by asking which agent platform to buy.
Write the nine lines. Define what the loop is trying to finish, what it can observe, how it will know whether it made progress, and exactly where it must stop for a person.
Then build the boring version.
The purpose of the first week is not to prove that AI can perform a task. It is to discover what the operation requires in order to close the loop.