What Is an AI Agent, Really?
A no-hype definition of AI agents: a model, a loop, and tools. Learn how agents differ from chatbots and why they suddenly got useful.
"Agent" has become one of the most overused words in tech. It gets stamped on chatbots, browser extensions, spreadsheet macros, and anything else with a model behind it. That makes it hard to tell what's real, and harder to know what you can actually hand off.
The good news is that the real definition is short and precise. An AI agent is a language model running in a loop, using tools, to reach a goal. That's it. Once you see those three parts, you can look at any product and tell whether it's an agent, what it can and can't do, and why it fails when it fails. This lesson gives you that lens, shows you the difference between chatting with an AI and delegating to one, and explains why agents went from party trick to everyday tool so quickly.
The three parts of every agent
Strip away the branding and every agent, from Claude Code to a custom support bot, is built from the same three pieces.
| Part | What it is | Analogy |
|---|---|---|
| The model | A large language model (LLM) such as Claude, GPT, or Gemini. It reads text and decides what to do next. | The brain |
| The tools | Actions the model can request: read a file, run a command, search the web, send an email, query a database. | The hands |
| The loop | Simple code that runs the model, executes the tool it asks for, feeds back the result, and repeats until the job is done. | The persistence |
A language model on its own can only produce text. Ask it what's in your budget.xlsx and it can only guess, because it can't open the file. Give it a read_file tool and it can ask to open the file, see what's inside, and answer correctly.
A tool is any function the model is allowed to request. The model never runs the tool itself. It writes a structured request like "call read_file with path budget.xlsx", and the surrounding program does the actual work and hands back the result. You'll see exactly how in Tools and Function Calling.
The loop is the part people overlook, and it's the part that makes an agent an agent. One tool call is a feature. A model that can call a tool, look at the result, decide what to do next, and keep going for twenty or two hundred steps is a worker.
Chatbot vs. agent: who is the loop?
Here's the clearest way to feel the difference. Suppose you want to know which of your blog posts get the most traffic and why.
With a chatbot, the conversation goes like this:
- You ask the question.
- It says, "Please paste your analytics data."
- You export a CSV, open it, copy it, paste it.
- It answers, but notices some rows are missing referrer data and asks you for that too.
- You go back, find it, paste it.
- It gives you a better answer, which you then copy into a doc.
Notice what happened. You were the loop. You fetched data, ran the steps, carried results back and forth, and decided when it was finished. The AI did the thinking, but you did all the doing.
With an agent that has access to your analytics export and your blog folder, you write one message:
Look at analytics/2026-q3.csv and the posts in /blog. Find the five posts with the most traffic, figure out what they have in common (topic, length, headline style, where the traffic came from), and write your findings to traffic-report.md with a short list of recommendations. Note any data quality problems you find.
The agent then opens the CSV, notices the missing referrer data on its own, opens the blog posts to compare them, maybe writes a small script to compute averages, drafts the report, re-reads it, and tells you it's done. Same intelligence; completely different experience. The agent is the loop.
| Chatbot | Agent | |
|---|---|---|
| Who gathers information? | You | The agent |
| Who takes actions? | You | The agent, via tools |
| Number of steps per request | One reply | As many as the task needs |
| Who decides it's done? | You | The agent (and then you check) |
| Your job | Operator | Manager and reviewer |
That last row is the shift this whole course is about. Working with agents is less like using software and more like managing a capable, fast, occasionally overconfident colleague.
What happens inside the loop
Every agent cycles through the same three beats, over and over:
- Think. The model reads everything so far (your request, its previous steps, what the tools returned) and decides on the next move.
- Act. It requests a tool: run this command, open that file, search for this phrase.
- Observe. The tool's result is added to what the model can see, and the cycle starts again.
The loop ends when the model decides the goal is met and replies with a final answer instead of another tool request, or when it hits a limit you set, such as a maximum number of steps.
A compressed version of a real coding agent run looks like this:
You: The signup form accepts emails without an @. Fix it.
Think: I need to find where the form validates emails.
Act: search files for "email"
Observe: src/signup.ts line 42: if (email.length > 0) ...
Think: That only checks the email isn't empty. I'll tighten it.
Act: edit src/signup.ts
Observe: file updated
Think: I should confirm I didn't break anything.
Act: run the test suite
Observe: 1 test failed: "accepts plus-addressed emails"
Think: My check rejects valid addresses like a+b@x.com. Loosen it.
Act: edit src/signup.ts
Observe: file updated
Act: run the test suite
Observe: all 48 tests passed
Agent: Fixed. The form now requires an @ and a domain. I also kept
plus-addressed emails working, which a test caught.Look at what made that good: the agent checked its own work and recovered from its own mistake without you stepping in. That's the payoff of the loop. Lesson The Agent Loop traces a longer run in detail, including where loops go wrong.
Why agents suddenly got useful
The idea of an AI agent is decades old. People have been wiring language models to tools since the first capable models appeared, and for a long time the results were unreliable: agents wandered off task, repeated themselves, or confidently declared victory after doing nothing. A few things changed.
Models got good at using tools
Newer models are specifically trained to work in loops: to choose the right tool, read its output carefully, notice errors, and try something else. Earlier models could call a tool; current ones can sustain a long task without losing the thread. This is the single biggest reason agents work now.
Models can hold much more in view
A model's context window is the amount of text it can see at once, its working memory. Windows have grown from a few pages to the equivalent of several books, which means an agent can keep your instructions, the files it has read, and its own progress in view across a long task. You'll learn the trade-offs in Context Windows, Tokens, and Cost.
Coding proved the concept
Software turned out to be the perfect training ground. Code has instant, objective feedback: it runs or it doesn't, the tests pass or they fail. That feedback lets an agent verify its own work, which is exactly what you saw in the trace above. Coding agents like Claude Code, OpenAI Codex, Cursor, and GitHub Copilot became the first agents that large numbers of people used every day, and the lessons learned there are spreading to research, data analysis, and office work.
Connecting tools became standard
Giving an agent a new ability used to mean custom integration work for each app. The Model Context Protocol (MCP) is an open standard that lets any agent plug into any tool server, so an agent that can talk to your calendar, your database, or your design files is now often a configuration change rather than a project. Module 4 covers MCP in depth.
What agents are good and bad at today
Agents are not magic, and knowing their shape saves you hours of frustration.
Agents tend to do well when:
- The goal is clear and you can describe what "done" looks like.
- They can check their own work (tests, a calculation, a file they can re-read).
- The task is multi-step but each step is something a competent person could do at a computer.
- Mistakes are cheap to spot and undo.
Agents tend to struggle when:
- The request is vague ("make the website better") and success is a matter of taste they can't see.
- Key information lives only in your head, and you didn't write it down.
- There's no way to verify the result, so errors pass silently.
- One wrong action is costly and hard to reverse, like sending an email to a client or deleting data.
Most of those weaknesses aren't about intelligence. They're about context and verification, which are things you control. That's why the skills in this course pay off so quickly.
A quick test for spotting real agents
When you meet a new AI product, ask three questions:
- What model is inside? That sets the ceiling on reasoning quality.
- What tools does it have? That defines what it can actually touch in the world, and what it could break.
- Who runs the loop? If you have to copy results back and forth, it's an assistant. If it takes multiple steps on its own and decides when it's done, it's an agent.
These questions cut through marketing fast. A "research agent" that can't browse the web is a writer. A "coding agent" that can't run your tests is guessing. And a product with powerful tools but no limits on what it can do with them deserves some caution.
Pick a small, real task that needs information from more than one place. For example: "Compare the three phone plans on these carriers' websites and recommend one for a family of four."
- Do it in a chat assistant with web search turned off (or tell it not to search). Count how many times you have to fetch, paste, or clarify something for it.
- Do it again with web search on, or in an agent that can browse. Watch which steps it takes on its own.
- Write down one sentence: in which version were you the loop?
Success looks like: you can point to specific moments where you were carrying information back and forth, and see that the agent version handled those steps itself. Keep your notes; the next lessons build on them.
- An AI agent is a model running in a loop, using tools, to reach a goal.
- The difference from a chatbot is who runs the loop: with a chatbot, you do; with an agent, the agent does and you review.
- Every agent cycles through think, act, observe until the goal is met or a limit is hit.
- Agents became useful because models got good at tool use, context windows grew, coding provided fast feedback, and MCP standardized tool connections.
- Most agent failures come from missing context or missing verification, both of which you control.
- Next, you'll set up your agent toolkit so you can try this for real.