Agents
Anything can start a loop. Stopping one is the engineering
An agent that cannot decide it is finished will keep going until somebody notices, and by then it has already acted.
What an agent actually is
Strip the word back and an agent is four things in a ring. Something triggers it. It plans what to do. It acts, usually by calling a tool that touches a real system. Then it checks whether the result is what was wanted.
Nothing in that description is new. Control systems have looked like this for fifty years. What is new is that the planning step can now read unstructured text, which widens enormously what can be automated and changes nothing about the discipline required to run it safely.
So we build them the way a control system is built. Bounded tools, an explicit definition of done, a retry limit, and a state you can inspect after the fact.
The loop
Four steps, and the fourth is the product
Trigger, plan, act, check. The first three appear in every demonstration and the fourth is what takes the time.
Check has to answer two questions the other steps never ask. Is this result acceptable, and if it is not, what now. Retry with a different approach, escalate to a person, or stop and leave the system in a state somebody can understand.
The tools are the risk surface
An agent is only as dangerous as the tools you hand it. A loop that can read a database is a reporting system. The same loop with permission to write is something that needs a review before it runs.
So the tool list is written down and kept short, each one is scoped as tightly as the job allows, and anything that costs money or sends a message to a person outside the company goes behind an explicit confirmation.
This is unglamorous and it is most of what makes the difference between an agent you can leave running and one somebody has to watch.
The choices
Four decisions that decide whether it can run unattended
None of these is about which model. All four are about the loop around it.
| Decision | What it settles | What goes wrong without it |
|---|---|---|
| Definition of done | When the loop may stop successfully | It keeps working on a task that was already finished |
| Retry limit | How many times it may try again | A cheap failure becomes an expensive one overnight |
| Tool scope | What it is allowed to touch | The blast radius of a misunderstanding is your whole database |
| Escalation path | Who it hands to when it cannot decide | It guesses, and nobody finds out until a customer does |
Every one of these is a line in a specification rather than a setting in a product, which is why they get skipped and why skipping them shows up later.
Or write here
Three fields, and a person reads it
Name, an address we can answer to, and what you are trying to build. You get a reference back straight away.
What would you hand to a loop?
Describe the task and who would otherwise do it. That is enough to say whether it is a good candidate.
