What Is an AI Agent?

“AI agent” is one of those phrases that gets used constantly and explained rarely. Strip away the hype and it is a simple idea: an agent is a language model that has been given tools and a goal, and that works toward the goal in steps instead of answering in a single reply.

That one difference, acting in steps versus answering once, is the whole distinction. Everything else is detail.

A chatbot answers. An agent acts. #

A plain chatbot is a question-and-answer machine. You type something, it produces text, and it is done. It cannot check anything, run anything, or take a second look. Whatever it knows, it knew before you asked, and whatever it gives you, it gives you in one shot.

An agent is different because it can do things between reading your request and giving you an answer. Ask an agent to “find the cheapest flight next Tuesday and book it,” and instead of guessing, it can search, read the results, compare them, and take an action. It observes the world, decides what to do next, does it, sees what happened, and repeats until the job is done.

The clearest way to feel the difference: a chatbot is someone answering a trivia question from memory. An agent is someone you hand a task to, who then goes off, uses the tools on their desk, and comes back when it is finished.

The parts of an agent #

Every agent, no matter how fancy, is built from the same few pieces:

  • The model. The language model is the brain. It reads the situation and decides what to do next. On its own it can only produce text, which is exactly why it needs the other parts.
  • Tools. These are the agent’s hands. A tool might be “search the web,” “read a file,” “run this code,” or “send an email.” Tools are how the model reaches out and affects something real.
  • A loop. The agent does not act once. It acts, sees the result, and decides again, over and over, until the task is complete. This repetition is the engine of an agent, and it has its own article: the agent loop.
  • Context. The agent’s working memory: your request, what it has done so far, and what its tools have returned. Everything it knows in the moment lives here.

Put simply: a brain that can decide, hands that can act, and a loop that lets it keep going until the work is done.

What agents are actually good at #

The pattern shows up anywhere a task takes more than one step and cannot be fully spelled out in advance:

  • Coding agents read a codebase, write changes, run the tests, see what failed, and fix it. This is the most mature use, and it gets its own deep dive.
  • Research agents search, read sources, follow leads, and pull findings together into an answer with citations.
  • Support and operations agents look up an account, check an order, and take an action on the user’s behalf.

The common thread is a goal that requires exploring, reacting to what you find, and adjusting, rather than producing one fixed answer.

When you actually need one #

Agents are powerful, and they are also slower, more expensive, and harder to control than a plain prompt. So the honest answer is that a lot of the time you do not need one. It is worth building an agent when a few things are all true:

  • The task is genuinely multi-step and hard to fully specify in advance. “Turn this rough spec into a working feature” fits. “Extract the date from this receipt” does not.
  • The outcome is worth the extra cost and wait. Agents burn more time and money than a single call, so the payoff has to justify it.
  • Mistakes can be caught. If the agent can check its own work, or a human reviews the result, or you can roll back a bad action, that is a good sign. If a single wrong step is catastrophic and irreversible, be careful.

If the task is a one-shot question with a clean answer, a plain prompt is faster, cheaper, and less likely to surprise you. Reach for an agent when the problem actually needs one to explore its way to the answer.

That is the whole idea. An agent is a model with tools, a goal, and permission to keep working until it gets there. The mechanism that makes it run is the agent loop, and it is simpler than you would guess.