An AI agent decides its own next step. That's the test
The word means two different things. Both definitions, the neighbouring terms it gets confused with, and a lead-triage agent costed at published API prices.
- AI Agent
- An AI agent is a software system that perceives its environment, chooses its own next action toward a goal, and acts through tools, repeating that loop until a stop condition is met.
The word means two different things
Search results mix them constantly, which is why the definitions you read contradict each other. Label them and the confusion goes away.
| Agent (classical AI) | Agent (LLM agent, 2022 onward) | |
|---|---|---|
| Canonical source | Russell & Norvig, AIMA, first edition 1995 | ReAct paper, October 2022; AutoGPT, March 2023 |
| What decides | any policy — rules, search, planning, reinforcement learning | a language model, prompted with a tool list |
| Environment | sensors and actuators, often simulated | function calls, HTTP APIs, shells, GUIs |
| Does a thermostat count? | Yes. It perceives temperature and acts on a heater. | No. There is no model choosing a next action. |
| Common failure | badly specified objective, so the policy optimises the wrong thing | unbounded loop, or a valid-looking tool call with wrong arguments |
Sense 1 is the academic one and it is deliberately broad: anything that perceives and acts. Sense 2 is what you were searching for. When someone says "we're deploying agents this quarter," they mean sense 2 — a model in a loop with tools and permission to act. That is where the money and the outages are.
Where it came from, with dates
AIMA (1995) gave the field the frame still in use: an agent is anything that perceives its environment through sensors and acts on it through actuators, and a rational agent picks the action expected to maximise its performance measure. The multi-agent systems literature of the 1990s built on that — societies of agents negotiating, which is a different subject from what vendors sell today. I wrote about that separately in multi-agent system, defined without the hype.
The current sense arrives in four steps, none of them academic.
| Date | What shipped | What it changed |
|---|---|---|
| October 2022 | ReAct paper | Interleaving a model's reasoning with external actions beats reasoning alone on tasks needing outside facts. That is the loop. |
| March 2023 | AutoGPT | Made the unattended version famous and, at the same time, demonstrated the headline failure: a goal-seeking loop with no cap burns tokens going in circles. |
| Mid-2023 | OpenAI function calling | The model returns a structured call, your code runs it, you hand back the result. Tool use stopped being prompt-parsing guesswork. |
| November 2024 onward | Model Context Protocol, then OpenAI's Agents SDK and Responses API in March 2025 | The loop became infrastructure rather than a weekend project. |
What it is not
Not a workflow. This is the distinction that matters most, and Anthropic draws it cleanly in its own engineering write-up: workflows are systems where LLMs and tools run through predefined code paths; agents are systems where the model directs its own process and tool use. If a human wrote the order of the steps, you have a workflow. Most of what gets pitched internally as an agent should be a workflow. They are cheaper, they are testable, and you can read the failure off a stack trace.
Not a chatbot. A chatbot with retrieval answers you. An agent changes state in a system you care about — writes to a CRM, sends the email, moves the deal stage. Read-only assistants are not agents, no matter what the pricing page says.
Not an RPA script. RPA replays recorded clicks and breaks when the DOM shifts. An agent re-decides on each turn from what it just observed. A computer-use agent looks like RPA from outside and is architecturally the opposite.
A worked example: inbound lead triage
Concrete, because a definition with no example is a slogan.
The goal handed to the agent: decide whether this inbound form fill is worth a rep's time, and if it is, post it to #sales-inbound with a reason. Three tools, described in the tool schema with typed arguments:
crm_search(email_domain)— returns existing accounts, open opportunities, last touch date.enrich_company(domain)— returns headcount, industry, tech signals from the enrichment vendor.post_slack(channel, message)— the only tool that writes anything.
Nothing in that list says which tool runs first. The model decides per turn: it may skip enrichment when the CRM already shows an open opportunity, or call enrichment twice on two domains in the email signature. That is what makes it an agent rather than the three-box workflow on the left of the diagram.
The run ends when the model emits a final answer, or at a step cap enforced in the calling loop — not in the prompt. Prompted limits are requests. Code limits are limits.
Now the arithmetic. Claude Sonnet's published API prices are $3 per million input tokens and $15 per million output. A typical run of 5 model calls at roughly 9,000 input and 500 output tokens each is 45,000 input and 2,500 output — about 13.5 cents plus 3.8 cents, so roughly $0.17 per lead. Two thousand leads a month is about $345. Prompt-cache reads are priced at 0.1x base input, so a stable system prompt pulls the input side down sharply.
Which is why I find spend on this class of agent boring rather than frightening. The expensive failure is not price per token. It is a loop with no cap, or a post_slack call that goes to a customer-facing channel.
How to tell whether something genuinely qualifies
Four questions. Three yeses and it is an agent.
- Does the order of tool calls vary between runs on different inputs? If every run produces the same call sequence, it is a workflow with a model inside it.
- Can it write? At least one tool must change state outside the model. Otherwise it is retrieval.
- Is there a stop condition in code? A step cap, a wall-clock timeout, a token budget. Unbounded loops are the most common production failure mode for agents, and the only reliable fix is a limit enforced outside the model.
- Is the loop observable after the fact? You should be able to reconstruct which tool ran with which arguments and what came back, per run, without attaching a debugger.
Question 4 is the one teams skip and then regret. An agent with no per-step log is not something you can operate; it is something that occasionally works.
I took Metadata.io from $0 to $15M ARR selling software that ran campaigns on people's behalf, and I hold 6 patents in AI-driven marketing, so I am biased toward this shape of system. I am also building a zero-human company in public, with agents in production I pay the bills for. The bias runs the other way on one thing: I would not hand an agent unsupervised spend authority yet. Budget changes are a write action where the cost of a wrong argument is unbounded, and that is the one place I still want a human keystroke between the decision and the money.
Sources
- Artificial Intelligence: A Modern Approach (Russell & Norvig) — The classical definition of an agent as something that perceives via sensors and acts via actuators; rational agent framing; first edition 1995.
- ReAct: Synergizing Reasoning and Acting in Language Models — October 2022 paper that formalised interleaving model reasoning with tool actions — the loop under most current LLM agents.
- Anthropic — Building effective agents — Vendor's own distinction between workflows (predefined code paths) and agents (models directing their own process and tool use), December 2024.
- OpenAI — Function calling guide — Mechanics of structured tool calls: model returns a call, your code executes it and returns the result.
- Anthropic — Introducing the Model Context Protocol — November 2024 open standard for exposing tools and data to models.
- OpenAI — New tools for building agents — March 2025 release of the Responses API and Agents SDK, including the agent loop as a supported primitive.
- AutoGPT repository — March 2023 project that popularised the unattended goal-seeking loop and its failure modes.
- Anthropic — Pricing — Claude Sonnet API pricing of $3 per million input tokens and $15 per million output tokens, and prompt-cache reads at 0.1x base input price, used for the cost arithmetic.