AI agent
Also called Agent
An AI agent is a program whose steps a language model picks at run time, based on the goal and on everything that has happened so far. An ordinary program, by contrast, follows steps that a person wrote in advance. The same request can therefore lead to different steps on different runs. The goal is usually given in plain language, not as a specification a program could check.
Deciding at run time lets an agent handle tasks that no one fully scripted. It also makes the behavior of an agent harder to predict than that of an ordinary program. An agent can recover from a failed step by trying something else, which a fixed script cannot do. The same freedom lets it take steps that no one expected, including harmful ones.
The model itself never touches the outside world. Everything it does goes through tools that a host program chooses to offer and to run, which makes that program the place to enforce limits. The host decides which tools exist and what each one may touch. Limits set there hold no matter what the model writes, while instructions in a prompt can be talked around.
Agent loop
The agent loop is the cycle of choosing a step and seeing its result that most agents run. The model receives the goal and the history so far, then answers with text or a tool call. The history grows with every step, and the whole of it goes to the model each time. Long runs therefore get slower and more costly per step, until the history is trimmed or summarized.
The host program carries out the call and adds its result to the history as an observation. The model reads that observation and picks the next step from what it learned. An error message is an observation like any other, so the model can read it and try a fix. Several calls can run at once when the model asks for them together.
The loop repeats until the model says it is done or a step limit is reached. A person watching the agent can also stop it at any point. A step limit guards against loops in which the model repeats the same failing action. Some agents also pause to ask a person before steps that cannot be undone.
Computer access
Computer access is a tool that gives an agent a shell or a code interpreter to work with. With it, an agent can run the programs it writes and fix its own errors, much as a developer would. The tool usually takes a command or a block of code and returns what it printed. A whole computer is more general than a set of narrow tools, since anything a program can do becomes possible.
The code an agent writes is untrusted code. The model may misunderstand the goal or follow instructions hidden in a web page it read, and its commands run without a person reviewing them first. Hidden instructions of this kind are called prompt injection. Even without an attacker, a model can delete the wrong files while trying to clean up.
Running those commands in a sandbox keeps their effects inside an environment that can be deleted. Coding agents and agents that operate a desktop both depend on this. The sandbox also needs egress control, since code that can reach the internet can send data out. A single run may need many such environments, one per attempt or per subtask.
Compute demands
The compute demands of an agent are set by how many steps it takes and how long each one waits. A run may take many steps, each waiting on a model and then on a tool. Most of the time goes to waiting, on the model or on a tool, rather than to computing. An environment kept open across a run therefore sits idle much of the time.
The latency of each tool therefore adds up across a run. Agents also create environments in large numbers and at unpredictable times, and keep some of them for hours. A slow start on a tool that runs often can outweigh everything else in a run. Demand also arrives in bursts, when many users start agents at once or one user runs an agent across many tasks.
An agent may fork an environment to try several ideas at once. Fast starts and copies that cost little make this practical, together with idle states that cost little to keep. Each copy starts from the same files and memory, so the attempts differ only in what the agent does next. The best result is kept and the rest are deleted.