← Previous: Hallucinations: Why They Happen and How to Reduce Them | Next: Evaluating GenAI Systems →

Last time we saw how a model answers questions using only what it was trained on, or what’s handed to it through RAG. In both cases, it’s still doing one thing: reading input, producing text back. It never actually does anything in the world. An agent is what happens when you give a model the ability to act, not just answer.

A Chatbot vs an Agent, in One Sentence

A chatbot takes your message and replies with text. An agent takes your message, decides what needs to happen, uses tools to actually make it happen, checks the result, and keeps going until the task is done.

That’s a real shift, not a marketing rebrand. Think about the difference between these two requests:

  • “What’s a good subject line for this email?” — a chatbot answers this fine. It’s just text in, text out.
  • “Send this email to my manager and follow up in three days if there’s no reply.” — this requires sending an actual email and tracking time. No amount of clever text generation alone can do that. Something needs to reach outside the conversation and take action.

That “something” is a tool the agent has access to — and the loop it runs to use that tool correctly is the whole idea behind this article.

The Core Loop: Plan → Act → Observe → Repeat

flowchart TD
    A[Goal / task given] --> B[Plan: what should<br/>happen next?]
    B --> C[Act: call a tool<br/>search, send email,<br/>run code, query a database]
    C --> D[Observe: look at<br/>the tool's result]
    D --> E{Is the task<br/>actually done?}
    E -->|No| B
    E -->|Yes| F[Return final answer]

Walk through a concrete example — “find out if it’ll rain tomorrow and text me if it will”:

  1. Plan — the model reasons: “I need current weather data. I don’t have that in my training data, and it changes daily anyway. I should call a weather tool.”
  2. Act — it calls a weather API (a tool), passing in the location.
  3. Observe — it reads the result: “60% chance of rain tomorrow.”
  4. Loop again — plan the next step: “That’s likely enough to count as ‘will rain.’ Now I need to send a text.” It calls a messaging tool.
  5. Observe again — the text sent successfully.
  6. Done — task complete, loop ends.

Notice the model never “knew” the weather. It knew how to find out — and that’s the actual shift from chatbot to agent.

Tools Are the Whole Trick

An agent is only as capable as the tools it’s connected to. Without tools, an LLM can only produce text based on what it already knows or was given in context — exactly what we covered in earlier articles. Tools are what let it reach outside that boundary: searching the web, querying a database, running code, calling an API, reading a file, sending a message. The model’s job becomes deciding which tool to use, when, and what to do with the result — not generating knowledge from nothing.

This is also why hallucination (from the last article) matters even more with agents. A chatbot that hallucinates gives you a wrong sentence. An agent that hallucinates might call the wrong tool, pass in the wrong data, or confidently report that a task succeeded when it didn’t. The stakes of “sounding confident while being wrong” go up considerably once the model can actually take action in the world.

Why This Isn’t Just “A Chatbot With Extra Steps”

The important distinction is the loop, not just tool access. A basic setup where a model calls one tool and stops is closer to a smart shortcut than a true agent. What makes something genuinely agentic is that it can take the result of one action, reassess, and decide what to do next — potentially several times — without a human manually feeding it each step. That’s the “observe → replan” part of the loop that separates “the model can use a calculator” from “the model can independently work through a multi-step task.”

Mental Model

Think of the difference between asking someone a question over the phone versus handing them a set of keys and a task list. The phone call gets you an answer based on what they already know. The keys and task list let them go check things, do things, come back with results, and figure out the next step themselves if the first thing they tried didn’t fully solve it. An agent is the second version — it’s not smarter at knowing things, it’s capable of going and finding out, then acting on what it finds.

Key Takeaways

  • A chatbot answers with text. An agent plans, acts using tools, observes the result, and repeats until the task is actually done.
  • The plan → act → observe → repeat loop is the defining feature of an agent — not just having access to a tool, but being able to reassess after using one.
  • Tools are what let an agent reach outside the conversation — search, code execution, APIs, databases, messaging — the model decides which to use and when.
  • Hallucination risk doesn’t go away with agents — it gets more consequential, since a wrong “fact” can turn into a wrong action.
  • This is the natural endpoint of everything covered so far: prompting shapes the request, RAG and tools supply real information, and the agent loop is what turns understanding into action.

Next up: Evaluating GenAI Systems — why “it feels good” isn’t enough, and how to actually measure whether a GenAI system is working.