AI engineering · 14 of 42
Reason, act, observe, then decide again
Scroll
Reason, act, observe, then decide again
ReAct is the loop most agents are built on. The model reasons about what to do, takes one action, reads the result, and uses that result to decide the next step.
The important property is that the plan is not fixed in advance. Each observation is evidence, so a tool returning something unexpected can change what happens next — which is the whole reason to run a loop rather than a script.
It is also where agents run away. Without a step limit, a timeout, scoped tool permissions and an explicit stop rule, a loop that cannot make progress will keep paying to discover that again. Useful autonomy is mostly a question of good boundaries.
Agents