What Is an AI Agent?
Strip the hype and an agent is three things: a model that can call tools, a loop, and the authority to decide what happens next.
On this page
“Agent” is used loosely enough to mean almost anything. Here is a definition tight enough to be useful:
An agent is a language model that can call tools, running in a loop, deciding for itself what to do next until a task is done.
Three components. Remove any one and you have something simpler that does not need the word.
The three components
Tools
The model can invoke functions you provide — search a database, read a file, call an API, run code. Without tools, a model can only produce text. With them, it can affect the world and observe results. See How Does Tool Calling Work?.
A loop
Output feeds back as input. The model calls a tool, sees the result, and decides what to do next. That cycle repeats until the task completes. See The Agent Loop.
Delegated control
This is the component that actually distinguishes an agent, and the one people underweight.
In a normal application, your code decides what happens next. In an agent, the model decides — which tool, with what arguments, how many times, when to stop. You define what is possible; the model chooses within it.
That is where the capability comes from, and where every difficulty comes from too.
What is not an agent
Useful to be strict, because the label gets applied to things that do not need it.
A chatbot produces text in a loop but calls no tools and controls nothing.
A single tool call — model requests a search, you return results, model answers. One step, no loop, no delegated control. This is tool use, and it is often the right design.
A fixed pipeline — retrieve, then summarize, then classify. Multiple steps and multiple model calls, but your code sequences them. This is a workflow, and for well-understood tasks it is usually better: predictable, debuggable, cheaper.
The distinction is not pedantic. The moment you hand sequencing to the model, you accept nondeterminism, variable cost, and a much harder debugging story. Worth it when the sequence genuinely cannot be known in advance; wasteful when it can.
Where agents earn their cost
The path depends on what is found. Debugging is the clean example — which file to read next depends entirely on what the last one contained. No fixed pipeline covers it.
Step count is unknown. Searching until an answer is found might take one query or twelve.
Recovery is required. A tool fails, and something needs to decide on an alternative.
Exploration is the task. Investigating a codebase, researching a question across sources.
Where they lose
The steps are known. If you can write the sequence, write the sequence. A workflow will be faster, cheaper, and diagnosable.
Errors are costly. Agents take wrong actions. If a wrong action sends an email or modifies production data, the failure modes are unacceptable without gating.
Latency matters. Every loop iteration is a full model call. Ten steps means ten round trips.
Cost sensitivity. Each iteration resends the accumulated history, so cost grows quadratically over a long run — the same conversation dynamic as chat, amplified by tool results being verbose.
The honest state of things
Agents work well in a narrower band than the discourse suggests.
They work when tools are few and well-described, tasks complete in a handful of steps, failures are cheap, and a human can review before anything irreversible. Coding assistants fit this well: file operations are reversible, feedback is immediate, the user is present.
They degrade with many similar tools, long horizons, and ambiguous success criteria. Reliability compounds downward — 95% per step is 60% over ten steps. Long autonomous runs remain unreliable in ways no prompt fixes.
The practical pattern is narrow scope, few tools, short loops, human review at consequential points. Most successful production agents look like this. The fully autonomous version is mostly still a demo.
What to remember
- Agent = tools + loop + delegated control. The third component is what makes it an agent.
- A chatbot, a single tool call, and a fixed pipeline are all not agents — and a pipeline is often the better design.
- Use agents when the path depends on findings; use workflows when the steps are known.
- Reliability compounds downward across steps, so keep loops short and gate irreversible actions.