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
Links
- Builds on: Prompting, Capabilities and limits
- Leads to: Tool use, Grounding and memory, Connecting tools with MCP, Agent risk, Delegating to an agent
- Competencies drawing on it: Recognizes an agent, its tools and its degree of autonomy
Lessons
- Watch a tiny agent work (tutorial)
- Assistant or agent? (explanation)
- Who decides the next step (explanation)
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.
Takeaways
- An agent is a model in a loop with tools. The model produces text, and when that text is a request the loop runs the tool and returns the result as more text. The model never runs anything itself.
- A tool is described to the model by name, purpose and parameters, in plain text, and that description is all the model has to decide when and how to ask for it.
- Each step of the loop is observe (read the task or the last result), think (write a request or an answer) and act (the loop runs the tool). Naming the turn tells you where a mistake came from.
- The loop ends when the model writes an answer, when the step limit is reached, or when a person stops it. A run that ended on a limit or a stop was interrupted in the middle of a step, and its output has to be read that way.
Example
This lesson has no runnable example or prompt block.
Assistant or agent?
Unlocks when you finish Assistant or agent?.
Takeaways
- A model takes text in and gives text out, once. An agent is software that calls the model in a loop, gives it tools, feeds the results back and stops when the goal is met.
- Tell the two apart by what the system can do without another prompt, whatever its interface looks like. A chat window can front an agent, and a button can trigger one plain model call.
- The harness is the software around the model: the loop, the tool definitions, the permission checks, the system prompt, context management and the stop rules. Agents on the same model differ because their harnesses differ, and the fix for a misbehaving agent is most often in the harness.
- List an agent's tools before you judge what it can do. What it can touch is what its tools can touch, and the tool that acts on other people is the one to look at first.
Example
This lesson has no runnable example or prompt block.
Who decides the next step
Unlocks when you finish Who decides the next step.
Takeaways
- The degree of autonomy of a workflow is how much the system may do before a person sees it. Three points cover most conversations: suggests, acts and asks before anything hard to undo, and runs unattended.
- Place a workflow by asking who decides the next step, never by how much text the system produces. Autocomplete that writes a whole function is low autonomy, because a person accepts each suggestion.
- Autonomy is a setting chosen for a task. One coding agent lands on three different points in three permission modes, and the choice depends on how costly a mistake is and how easily it can be undone.
- To move a workflow one step, change which step a person decides. An agent that merges its own pull request has moved up. An agent that shows a change instead of writing it has moved down.
- The safety course's human in the loop section picks the steps that need a person, and the using-agents course's choosing autonomy section applies the same scale to a task you delegate.
Example
This lesson has no runnable example or prompt block.
Sources
AEC-01What are AI agents: model versus agent, autonomy levels, when a prompt suffices, Agent Engineer Course (course)DLAI-11Agentic AI: M1 workflows and autonomy, M2 reflection, M4 evals and error analysis, M5 autonomous agents, DeepLearning.AI (course)Academy claude-platform-101Claude Platform 101, Claude Academy (course)