# What an agent is

> 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".

Page: https://schubergphilis.github.io/ai-training/topics/concepts/what-is-an-agent/
License: CC BY-SA 4.0, https://creativecommons.org/licenses/by-sa/4.0/

*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](https://schubergphilis.github.io/ai-training/glossary/#model-vs-agent)
- **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](https://schubergphilis.github.io/ai-training/glossary/#tool)
- **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](https://schubergphilis.github.io/ai-training/glossary/#agent-loop)
- **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](https://schubergphilis.github.io/ai-training/glossary/#degree-of-autonomy)
- **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](https://schubergphilis.github.io/ai-training/glossary/#harness)
- **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](https://schubergphilis.github.io/ai-training/glossary/#environment)
- **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](https://schubergphilis.github.io/ai-training/glossary/#model-request)
- **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](https://schubergphilis.github.io/ai-training/glossary/#stateless-model)

## Links

- **Builds on:** [Prompting](https://schubergphilis.github.io/ai-training/topics/concepts/prompting/), [Capabilities and limits](https://schubergphilis.github.io/ai-training/topics/concepts/limits/)
- **Leads to:** [Tool use](https://schubergphilis.github.io/ai-training/topics/building-agents/tool-use/), [Grounding and memory](https://schubergphilis.github.io/ai-training/topics/concepts/grounding/), [Inspecting what the agent sends](https://schubergphilis.github.io/ai-training/topics/customizing-agents/inspecting-the-agent/), [Connecting tools with MCP](https://schubergphilis.github.io/ai-training/topics/customizing-agents/mcp/), [Agent risk](https://schubergphilis.github.io/ai-training/topics/safety/agent-risk/), [Delegating to an agent](https://schubergphilis.github.io/ai-training/topics/using-agents/delegating/)
- **Competencies drawing on it:** [Reasons about what a model request costs and why](https://schubergphilis.github.io/ai-training/competencies/concepts/reasons-about-cost/), [Recognizes an agent, its tools and its degree of autonomy](https://schubergphilis.github.io/ai-training/competencies/concepts/recognizes-agents/)

## Lessons

- [Watch a tiny agent work](https://schubergphilis.github.io/ai-training/concepts/agent-loop/) (tutorial)
- [Assistant or agent?](https://schubergphilis.github.io/ai-training/concepts/assistant-or-agent/) (explanation)
- [Who decides the next step](https://schubergphilis.github.io/ai-training/concepts/autonomy-scale/) (explanation)
- [One prompt, many requests](https://schubergphilis.github.io/ai-training/concepts/one-prompt-many-requests/) (explanation)

## Sources

- `AEC-01` [What are AI agents: model versus agent, autonomy levels, when a prompt suffices](https://lsimons.github.io/agent-engineer-course/01-what-are-ai-agents/), Agent Engineer Course (course)
- `DLAI-11` [Agentic AI: M1 workflows and autonomy, M2 reflection, M4 evals and error analysis, M5 autonomous agents](https://www.deeplearning.ai/courses/agentic-ai), DeepLearning.AI (course)
- `Academy claude-platform-101` [Claude Platform 101](https://academy.claude.com/courses/claude-platform-101), Claude Academy (course)
- `Claude Code agent loop` [How the agent loop works](https://code.claude.com/docs/en/agent-sdk/agent-loop), Claude Code documentation (reference)
- `Claude docs messages` [Messages](https://platform.claude.com/docs/en/api/messages), Claude Platform documentation (reference)
