Skip to the content
AI Explainedpreview Learning Center

AI Explained

From one answer to an agent

An agent is a model that chooses its own next step. Powerful, and not always what you need.

The loop

What makes an agent an agent

An agent is a model that chooses its own next step. Give it tools and a task, and it works in a loop until the task is done.

actobserveThe taskFrom a personThe modelDecides the next stepA toolSearch, read, run,writeThe resultWhat came backDoneOr ask a person

Press Play to walk through it, or Listen to have it read to you.

Read all the steps
  1. A person gives the task once.
  2. The model chooses a tool and calls it.
  3. The tool does something: it searches, reads a file, runs a command.
  4. The model reads what came back and decides what to do next. This is the loop.
  5. It goes round as many times as the task needs. Nobody wrote the steps ahead of time.
  6. It stops when the task is finished, when it needs a person's decision, or when it hits a limit.

Workflow or agent

In a workflow, models and tools follow paths written in code ahead of time. In an agent, the model directs its own steps and its own use of tools [1].

Start simple

The advice from the people who build them: find the simplest solution that works, and add a multi-step system only when the simple one falls short [1].

The cost of autonomy

Agents cost more and their errors can compound, so the same source recommends testing them in a sandbox with guardrails [1].

Long tasks

Managing what the agent sees

On a long task the window fills with old results. What to keep, what to summarize and what to move out is most of the engineering.

Context engineering

The strategies for choosing and maintaining the best set of tokens in the model's window while it works: everything beyond the prompt itself [2].

An attention budget

As the window fills, the model recalls what is in it less accurately. Context is a limited resource, and every added token spends some of it [2].

Compaction

When a conversation nears the limit, summarize it and start a fresh window with the summary [2].

Notes outside the window

The agent writes notes somewhere that persists and reads them back when it needs them [2].

Subagents

Specialized subagents work in clean windows of their own and return short summaries [2].

Sources

Where this comes from

Read 2026-11-15, unless a source gives its own date. A number in brackets points to the page a statement was read on. Sentences with no number, the small demonstrations and the tools are this center's own explanations.

  1. Anthropic: Building effective agents (Erik S. and Barry Zhang, 2024-12-19)
  2. Anthropic: Effective context engineering for AI agents (Applied AI team, 2025-09-29)