Skip to content

What an agent is

Concepts · topic concepts/what-is-an-agent

An agent is a model placed in a loop with tools, so that instead of only answering it can look things up, act, observe the result and decide what to do next. This topic separates the model from the agent built around it, explains tools and the loop, and introduces the scale from "suggests" to "acts unattended".

Concepts

Model vs agent
A model takes text in and produces text out, once. An agent is software that calls a model repeatedly, gives it tools, feeds the tool results back and stops when a goal is met. The model supplies judgment; the agent supplies hands, memory and a loop. Most of what makes an agent useful or dangerous lives in the software around the model. glossary
Tool
A function the agent can ask to run, described to the model by name, purpose and parameters. Reading a file, searching the web, running a command or calling an API are tools. The model does not execute anything itself; it emits a request, the agent runs it and returns the result. Tools are how an agent reaches beyond its context window. glossary
Agent loop
The cycle an agent runs: observe the current state, think about what to do, act through a tool, observe the result, repeat. The loop ends when the model says it is done, a step limit is hit or a human intervenes. Everything an agent does, good or bad, is some number of turns of this loop. glossary
Degree of autonomy
How much an agent may do before a human sees it. At one end it only suggests; further along it acts but asks before anything irreversible; at the far end it runs unattended. Autonomy is a setting chosen for a task, not a property of the product, and the right level depends on how costly a mistake is and how easily it can be undone. glossary
Harness
The software around the model that makes it an agent: the loop, the tool definitions, the permission checks, the system prompt, context management and the stop rules. Two agents using the same model can behave very differently because their harnesses differ. When an agent misbehaves, the fix is usually in the harness, not the model. glossary
Environment
The files, programs, services and data that an agent's tools act on. The model chooses an action and the harness carries it out, and the effect lands in the environment: a file changes, a command runs, a message goes out. The environment is the third part of an agent, next to the model and the harness. What it contains decides what the agent can reach and what a mistake can damage, so a test copy limits both. glossary
Model request
One call from the harness to the model, carrying the instructions, the tool descriptions and the history so far, and answered by one response. A single prompt from a person often leads to many requests. The model asks for a tool, the harness runs it and sends the result in a new request, and this repeats until the model answers without asking for a tool. Each of these round trips is one turn of the agent loop. glossary
Stateless model
The model keeps nothing from one request to the next. Each request has to carry everything the model should take into account, so the harness sends the whole conversation again every time. What feels like the agent's memory is text the harness stores and sends again, or notes it writes to files and reads back later. Clearing or shortening that text changes what the model knows at once. glossary

Lessons

Your reference

Each lesson above adds its takeaways and its example here once you finish it. Your reference lists every lesson you have finished.

Watch a tiny agent work

Unlocks when you finish Watch a tiny agent work.

Assistant or agent?

Unlocks when you finish Assistant or agent?.

Who decides the next step

Unlocks when you finish Who decides the next step.

One prompt, many requests

Unlocks when you finish One prompt, many requests.

Sources