What an AI agent really is
Strip the word back and an agent is a model in a loop that is allowed to press buttons. The loop is three lines long. The danger is in the buttons.
7 modules, drawn as you go. Step through them below, or read them straight down underneath — about 4 minutes either way.
The modules
- 01
A model that can only talk
On its own a model produces text and nothing else. It cannot open a file, send an email or look anything up. Everything an agent appears to do is done by ordinary code sitting around it.
- 02
Give it a list of tools
You hand it a description of things it may ask for: search the web, read this folder, send a message. Each one is a plain description of what the tool does and what it needs — written for the model to read, in the same way you would brief a new colleague.
- 03
It asks for one
Instead of answering, the model can reply with a request: run search with these words. That request is just text in an agreed shape. The model has not done anything — it has asked.
- 04
Your code runs it
Your program reads the request and carries it out, or refuses. This is the only place in the entire system where anything real happens, and it is entirely under your control, not the model’s.
- 05
The result goes back in
Whatever came back — search results, the contents of a file, an error — is added to the conversation and the model is asked again. It now knows something it did not know a moment ago.
- 06
Round again until done
Ask, run, feed back, ask again. That loop, repeated, is the whole of what people mean by an agent. There is no planner, no will and no initiative in it — just a loop that keeps going until the model stops asking for tools.
- 07
Where it goes wrong
Since the loop runs unattended, a bad request runs unattended too. An agent that can delete, send or pay needs a human gate on those particular tools, and a hard limit on how many times round the loop it may go. Both are your code’s job. The model will not stop itself.
Everything on this page is drawn by the page itself, so it costs nothing to load and reads the same on a slow connection.