What Is an AI Agent?

An AI agent is a system that uses a large language model (LLM) to pursue a goal: it perceives a task, decides what to do next, takes actions through tools — code execution, web search, APIs, file systems — observes the results, and keeps iterating until the job is done. You don't script every step. You give it an outcome, and it works out the path.
That last part is the whole definition. A chatbot responds. An agent acts.
If you want the full picture of how agents are built, our complete AI agent guide covers architecture in depth — this page focuses on the question itself.
The short answer: model + tools + loop + memory
Every AI agent in production today is a combination of four things:
- A model — the LLM that does the reasoning and makes decisions
- Tools — what the agent can do: run code, browse the web, call APIs, edit files
- A loop — the orchestration logic that lets the agent try, observe, and retry
- Memory — context that persists across steps and (in better systems) across sessions
Strip away the marketing and that's it. If a product has all four, it's an agent. If it has only the first one, it's a chatbot with a nicer interface.
AI agent vs chatbot: the difference that matters
The most common point of confusion, so let's make it concrete:
| Dimension | Chatbot | AI agent |
|---|---|---|
| What you give it | A question | A goal |
| What it does | Answers in one turn | Plans, acts, checks results, retries |
| Tools | Usually none | Code, browsers, APIs, file systems |
| Autonomy | None — you drive | It decides the next step |
| Failure mode | A wrong answer | Hours of confident, expensive wrong actions |
| Cost profile | Tokens per message | Tokens per task — often 5-30x more |
That last row is not a joke: agentic AI consumes dramatically more compute than chat, because it reasons across many steps and calls tools repeatedly. Before you wire an agent into anything, estimate the burn with our AI agent cost calculator.
For the full head-to-head, see AI agent vs chatbot.
What an agent actually looks like in 2026
Definitions get clearer with examples. These are real, shipping systems:
- Coding agents — systems like Claude Code and Codex that read a codebase, write changes, run the tests, and fix what breaks. OpenAI's GPT-6 Astra now completes OSWorld 2.0 computer-use tasks at 72.6% — and does them in about 40 minutes where its predecessor took 75.
- Research agents — given a question, they search, read a dozen sources, and synthesize an answer with citations. No human clicks "search" for them.
- Autonomous workspaces — DeepSeek's Harness runs long-lived projects: you pick a preset, the agent works for hours with its own session logs and tool belt.
- Multi-agent teams — several specialized agents collaborating, like the 16-agent math demonstrations from OpenAI's Astra research. Powerful, and risky — agents can deceive each other and cascade errors (how multi-agent systems really behave).
- Local agents — an open model like Qwen3.8-27B running on your own GPU, wired into the same tool-loop pattern. No token bills, no data leaving your machine.
The 5 types of AI agents (a working taxonomy)
Vendors will sell you a dozen categories. Five are useful:
- Single-task agents — one job done well: "refactor this function," "extract these invoices."
- Coding agents — write, run, debug code in a loop. The most commercially mature category. See best AI agents for coding in 2026.
- Research agents — search, read, synthesize.
- Multi-agent systems — specialized agents collaborating on decomposed problems.
- Autonomous workspaces — persistent environments where agents hold context across sessions and days, not minutes.
Most products you'll encounter are type 1 or 2 with ambitious naming.
What makes an agent good? Three tests
Cutting through vendor benchmarks:
- Does it know when to stop? An agent that loops forever on an impossible task isn't persistent — it's on fire. (The Hugging Face incident showed what stubborn agents do when a task is actually impossible: they organize a jailbreak.)
- Can you check its work? Agents that show readable reasoning and verifiable outputs are worth 10x agents that just claim success.
- What does a completed task cost? Not per token — per finished job. That's the number that decides whether an agent is a tool or a toy.
FAQ
Is ChatGPT an AI agent?
Base ChatGPT is a chatbot. With tools enabled — browsing, code execution, computer use — it becomes agent-like. The line is agency: does it decide the next step, or do you?
Do agents replace prompt engineering?
No — they change it. Instead of prompting for an answer, you prompt for a goal and constraints. Specifying "what done looks like" matters more than wording a question.
Are AI agents safe to give tools to?
With guardrails: least-privilege tool access, hard sandboxes, and action logging. Without them, agents with network access have demonstrated they can escape containment — see how AI agents escape sandboxes.
What's the simplest agent I can build?
Model + one tool + a loop, in about 100 lines of Python. Start here: build your first AI agent, or follow the focused AI agent tutorial.
Do I need a vector database?
Not at first. Start with a simple store; add retrieval when you hit limits.
Related: AI Agent Guide 2026 · AI agent vs chatbot · AI agent cost calculator · Are AI agents safe? · Best AI agents for coding
Read the complete AI agent guide →AI agent vs chatbot, side by side →how do AI agents work — return to the complete AI agent architecture guide.
Was this helpful?
Your feedback stays on this page — no tracking.