What is an AI agent?
An AI agent is software that gives a language model a goal, a set of tools and a loop: the model picks an action, a tool carries it out, the result comes back, and the model decides again until the task is done or a limit stops it. A chatbot answers once; an agent keeps working.
Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.
You give the agent a goal in plain language, such as "find out why the build fails and fix it".
The model reads the goal, its instructions and what it has learned so far, then picks one action: call a tool, ask you something, or finish.
The tool runs for real: a search, a file edit, a shell command, an API call. Its output is added to the conversation.
The model reads that output, judges progress against the goal and picks the next action. This repeat is the loop that makes it an agent.
It stops when it produces a final answer, hits a turn or cost limit, or reaches a point where a person has to decide.
Good agents stop for high-stakes actions on purpose. Autonomy is a dial, not a switch.
AI agent versus workflow
The three big vendor definitions agree on the core. Anthropic draws a line between workflows, where a model and tools are "orchestrated through predefined code paths", and agents, where the model directs its own process and tool use. OpenAI's guide puts it as systems that "independently accomplish tasks on your behalf" and says plainly that chatbots, single-turn LLM calls and classifiers are not agents. Google describes software that uses AI to pursue goals, with reasoning, planning, memory and some autonomy.
The practical test: who decides what happens next? If your code decides (call the model, then call the API, then call the model again), you have a workflow. If the model decides which tool to call, in what order, and when it is finished, you have an agent. Many useful systems sit in between, and that is fine. The label matters less than knowing where the decisions live when something goes wrong.
Example: fixing a failing test
Tell a coding agent "the auth tests fail, fix them". It runs the suite and reads the error. It searches for the file the stack trace names and reads it. It edits the file, runs the suite again, sees one test still failing, reads the new error, edits once more, and runs the tests a third time. Green. It reports what changed.
Nobody wrote that sequence down. Six tool calls happened because each result told the model what to do next. Replace the failing test with a flaky network call and the sequence would be different. That adaptability is the whole point, and it is also why agents need limits: a model that keeps trying can also keep trying the wrong thing.
When to use an AI agent
Agents earn their cost on open-ended tasks where you cannot predict the number of steps: debugging, research across many sources, a change that touches files you have not identified yet. OpenAI's guide names the sweet spots as nuanced judgement, rulesets too tangled to maintain, and work that lives in unstructured text.
They are the wrong tool for a fixed pipeline. If the steps are known, a workflow is cheaper, faster and easier to test. Anthropic's advice is to start with a single model call, add retrieval or examples, and only build an agent when simpler versions fall short. Agents trade latency and cost for flexibility, and every extra step is a chance for an error to compound.
Common mistakes
- Calling any LLM feature an agent. Autocomplete, summarisation and a chatbot with a knowledge base are valuable, but they do not loop over tool results. Ask where the next step gets decided.
- No stopping condition. Set a maximum number of turns or a budget. A loop with no exit is the first bug you will meet in production.
- Letting the agent grade itself. Give it ground truth it can check, such as a test run or a build exit code, instead of trusting a sentence that says the work is done.
- Skipping the human checkpoint. Irreversible actions, payments, deletions and anything that touches other people should pause for approval until the agent has a track record.
FAQ
- Is a chatbot like ChatGPT an AI agent?
- Not by itself. A chat model that answers one message at a time is a single LLM call. It becomes an agent when it can call tools, read what came back and decide its next step without you prompting each one. The same model can power both; the loop and the tools are what change.
- What are some AI agent examples?
- Coding agents such as Claude Code, Codex and Cursor's Agent, which read a repository, edit files and run tests. Customer support agents that look up an order and issue a refund. Research agents that search, read and compile a report. Computer-use agents that drive a browser. Each one is a model plus tools plus a loop.
- How autonomous is an autonomous AI agent?
- As autonomous as its limits allow. Most agents run many steps on their own, then stop for approval before risky actions, when they fail repeatedly, or when a turn limit is reached. Fully unattended runs exist, but they rely on sandboxes and checks rather than trust.
Stop sending HTMLover Slack.
Create an account in a minute, connect your coding agent, and make your first board.