In One Sentence

An AI agent is a program that uses a large language model as its “brain”: you give it a goal, and it breaks the goal into steps, decides which tools to call, looks at what happened, and picks the next move until the job is done or it stops to ask you for help.

How It Differs from a Chatbot

A regular chatbot works in a single turn. You send a message, the model writes a reply, and that’s it. It doesn’t look anything up, doesn’t touch files, and doesn’t check whether its answer actually works.

An agent adds two things: action and a loop. Ask a coding agent to “run this project’s unit tests and fix whatever fails,” and it will read the project layout, find the test command, run it, read the errors, edit the code, and run the tests again until they pass. At every step the model reacts to real results instead of guessing an answer in one shot.

The short version: a chatbot talks, an agent does.

The Building Blocks

There’s no single official blueprint, but most agents are built from four parts.

The model (reasoning core). Usually an instruction-following LLM with tool-calling support. It interprets the goal, makes a plan and chooses the next action.

Tools (the ability to act). A model can only produce text. Tools are what let it act on the world: web search, a code sandbox, database queries, an email API, a browser. The model emits a structured request, an outside program runs it, and the result goes back to the model.

Memory (context management). Short-term memory is the running conversation and action log inside the model’s context window. Long-term memory typically lives in external storage, such as a vector database or plain files, so information can survive across sessions.

The control loop. This is the orchestrator that ties everything together. It parses the model’s output into tool calls, executes them, feeds results back, and enforces stopping conditions: task complete, step limit reached, or human approval required.

A Typical Loop

One influential research approach is ReAct (Reasoning + Acting), which has the model alternate between thinking and acting:

  1. Think: given the goal and what’s known so far, decide what to do next.
  2. Act: call a tool, for example search for a keyword.
  3. Observe: read what the tool returned.
  4. Repeat: go back to step one with the new information until a final answer is ready.

Simple as it looks, this loop addresses a core weakness of language models. Their knowledge is frozen at training time and they can’t verify their own output. By acting and observing, an agent gets fresh, real information and can correct itself based on actual results.

What Agents Are Good At

Agents shine on multi-step tasks with a clear definition of done, such as:

  • Coding: reading code, fixing bugs, running tests, committing changes.
  • Research: several rounds of searching and reading, then a written summary.
  • Data work: querying databases, cleaning data, producing charts.
  • Office automation: triaging email, filling forms, moving data between systems.

If a task only needs one answer, like explaining a concept, an agent is usually slower and more expensive, because every loop iteration costs another model call.

Single Agent vs. Multiple Agents

For complex jobs, some systems split work across several agents: one plans, one writes code, one reviews. The upside is clear roles and cleaner context for each agent. The downside is coordination overhead and harder debugging when something breaks. In practice, teams usually get one agent working reliably before splitting it up.

Common Misconceptions

“An agent is a new kind of model.” It isn’t. An agent is a system built around a model. The same model can power a plain chatbot or, with tools and a loop, an agent.

“More autonomy is always better.” The more an agent can do on its own, the bigger the damage when it’s wrong. Irreversible actions like deleting files, moving money or sending external email usually deserve a human confirmation step.

“More tools make a better agent.” Too many tools make selection harder and their descriptions eat into the context window. A small set of well-scoped, well-documented tools tends to work better.

“Agents don’t make mistakes.” Agents run on LLMs, so they can still misread the goal, make things up or get stuck in loops. Step limits, execution logs and checks on key results are standard engineering safeguards.

Further Reading