What an AI agent is

An AI agent is a program in which a language model decides, step by step, which actions to take with the tools it has been given, and keeps going until the task is done or it is stopped. A chatbot only answers; an agent acts.

Definitions vary between vendors, but they agree on the core. OpenAI: "Agents are systems that independently accomplish tasks on your behalf" (OpenAI, A practical guide to building agents, p. 4, checked 2026-10-28). Anthropic's Agent SDK docs: "An agent is an application that completes a task by planning its own steps and calling tools that read files, run commands, or edit code" (Claude Agent SDK overview, checked 2026-10-28).

Chatbot, workflow, agent

The difference is who decides the next step: the person, your code, or the model.

Chatbot Workflow Agent
Who decides the next step The person typing Your code, written in advance The model, at run time
Uses tools No, or one fixed lookup Yes, in a fixed order Yes, chosen as it goes
Number of model calls One per message A fixed number Unknown in advance
Example "Rewrite this email more politely" Every new invoice: extract fields → check totals → save to the database "This test fails; find out why and fix it"
Main risk A wrong answer A wrong answer at one step Wrong actions, repeated, at your expense

Anthropic draws the same line. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths"; agents are "systems where LLMs dynamically direct their own processes and tool usage" (Anthropic, Building effective agents, December 2024, checked 2026-10-28). OpenAI says that "simple chatbots, single-turn LLMs, or sentiment classifiers—are not agents" (OpenAI guide, p. 4).

Both vendors advise starting with the simplest option. Anthropic recommends "finding the simplest solution possible, and only increasing complexity when needed" (Building effective agents). Microsoft is blunter: "If you can write a function to handle the task, do that instead of using an AI agent" (Microsoft Agent Framework overview, checked 2026-10-28).

The three parts: model, tools, instructions

Every agent is a model, a set of tools, and instructions. OpenAI's guide names exactly these three components (p. 7).

The loop

An agent runs in a loop: the model picks an action, the program runs it, the model reads the result, and repeats. OpenAI: a run is "typically implemented as a loop that lets agents operate until an exit condition is reached" (OpenAI guide, p. 14).

A concrete run of a coding agent asked to fix a failing test:

  1. Model: "Run the tests." → program runs npm test → 1 failure in cart.test.js.
  2. Model: "Read cart.js." → program returns the file.
  3. Model: "Edit line 42: the discount is applied twice." → program edits the file.
  4. Model: "Run the tests again." → all pass.
  5. Model: "Done. Here is what I changed and why." → loop ends.

Exit conditions are usually: the model says it is done, a step or cost limit is reached, an error occurs, or a person stops it. Without limits, a confused agent can loop for a long time, and every turn costs tokens. Anthropic measured that its agents "typically use about 4× more tokens than chat interactions" (Anthropic, multi-agent research system, June 2025, checked 2026-10-28).

Levels of autonomy

How much an agent may do without asking is a design choice, separate from how capable its model is. A research paper from the University of Washington proposes "five levels of escalating agent autonomy, characterized by the roles a user can take when interacting with an agent: operator, collaborator, consultant, approver, and observer" (Feng, McDonald and Zhang, Levels of Autonomy for AI Agents, arXiv 2506.12469, 2025, checked 2026-10-28).

In practice, coding agents expose this as permission settings. A simplified ladder, as you will meet it in tools:

Level What the agent may do alone Typical setting
Suggest Nothing; it proposes, you apply Chat, autocomplete
Ask each time Read freely; every edit or command needs your approval Default in many coding agents
Allow-listed Run approved commands (tests, linters) alone; ask for the rest Per-project permission files
Autonomous in a sandbox Anything inside an isolated container or VM, no access to your real accounts Cloud agents, CI runners
Autonomous with real credentials Deploy, pay, email, change production Only with tight scopes and spend limits

The ladder is our summary, not a standard. Each step up saves human time and raises the cost of a mistake, so the right level depends on what the tools can reach. The security page covers how to set it.

When an agent is the wrong tool

See also

Glossary terms used on this page: Agent, Agent SDK, Chatbot, Cloud, Coding agent, Container, Deploy, LLM, MCP (Model Context Protocol), Model, Prompt, Provider, Token, Tool, Workflow.

Sources

All checked on 2026-10-28.


First version written with AI assistance and checked against the sources on 2026-10-28. Found a mistake? Fix it or open an issue. Text licensed under CC BY 4.0.