Observe, orient, decide, act
Military people call it OODA. Software people call it a control loop. Agent builders usually call it ReAct. The names differ, but the shape is the same: the system reads the current situation, interprets it through a goal, chooses an action, executes, and inspects the result.
The loop is where agent quality lives. Bad agents do not fail because the model forgot how to write English. They fail because the loop accepts vague observations, hides tool errors, has no iteration limit, or cannot tell the difference between progress and motion.
Stop conditions are first-class design
Every loop needs an exit. Common exits are final answer, maximum iterations, cost limit, wall-clock timeout, repeated error threshold, human interrupt, and context budget pressure.
If you cannot explain why a run stops, you cannot safely deploy it. Infinite autonomy is not intelligence; it is a billing incident wearing a lab coat.
The observation must be useful
A tool result should not dump a 40 KB JSON blob back into context. It should summarize the facts the model needs to make the next decision: what happened, whether it succeeded, what changed, and what the next available action is.