Skip to content
TheAgent Ecosystem
AI Agents

What Is an AI Agent? A Plain-English Guide for Builders

Not a chatbot, not a chain: an LLM in a loop that picks its own next step.

Muhammad Qasim HammadAI-assisted10 min read1,940 words

AI-drafted, reviewed by Muhammad Qasim Hammad on July 1, 2026. See our AI disclosure.

AI Agents: What Is an AI Agent?
Table of contents
  1. What is an AI agent, in one plain sentence?
  2. How does the agent loop actually work? (perceive, decide, act, observe)
  3. Agent, chatbot, chain, or workflow: which is it?
  4. What do AI agents look like in practice? (n8n examples)
  5. So, do you actually need an agent?

You keep seeing the word everywhere. Your automation tool ships an "AI Agent" node, a vendor calls its chatbot an "agent," and a LinkedIn post promises agents will run your business by Friday. The word has been stretched until it means almost nothing. An AI agent is a large language model running in a loop that decides its own next action, instead of following a path you wrote in advance.

That one idea separates a real agent from the three things people mix it up with: a chatbot that only talks, a chain that makes one fixed model call, and a plain automation that runs hardcoded steps. This guide is for people who build automations, so every idea lands in concrete terms you can wire up, not abstractions.

What is an AI agent, in one plain sentence?#

An AI agent is a large language model running in a loop that decides its own next action. It reads its situation, picks what to do, does it, checks the result, and repeats until the goal is met or it gives up. You own the goal; the model owns the next step.

A normal model call is passive. You send a prompt, it answers once, and it stops. An agent is active: it keeps going and takes actions in the world between thinking steps, like calling an API, writing to a database, or sending a message. The answer is not the end of the work, it is one move inside a larger task.

The structural shift is what matters. In an automation you write the path and the model fills in a blank. In an agent the model writes the path as it goes. That single change, the model choosing what happens next instead of your code, is the line between "automation with an AI step in it" and an actual agent.

It helps to see the whole family at once. People attach the word "AI" to four different shapes, and only one of them is an agent.

Tree splitting plain automation, chatbot, chain or workflow, and agent by who controls the pathThe dividing line is control flow: you hardcode the path (automation, chain) or the model chooses it (agent).

The dividing line in that tree is control flow. Plain automation has no model at all. A chatbot has one model call and can only talk back. A chain or workflow uses the model and tools, but along a path you laid out. An agent is the only shape where the model holds the wheel.

How does the agent loop actually work? (perceive, decide, act, observe)#

Every turn, the agent runs four moves: perceive its full context, decide the next action, act by calling a tool, then observe the result and judge whether it is done. If not, it loops again. Your code sets the goal and the guardrails; the model chooses each step inside them.

Here is each move in plain terms:

  • Perceive. The model reads everything it has for this turn: the goal or system prompt, the list of tools it is allowed to use, any memory, and the full history of prior actions and their results.
  • Decide. The model reasons and picks the next action, usually which tool to call and with what arguments.
  • Act. The chosen action runs. That is a tool call, an HTTP request, a database query, or a snippet of code.
  • Observe. The result comes back, the model reads it, and it judges whether the goal is met. If not, the loop repeats from perceive.
Circular four-stage agent loop, perceive, decide, act, observe, around a central language modelAn agent is an LLM in a loop. Your code owns the goal and the guardrails; the model owns the next step.

Tools are the agent's hands. Without tools, a model can only produce text. Tools are what let it search, fetch, write, and act. In n8n these are sub-nodes wired into the AI Agent node: an HTTP Request tool, a Google Sheets tool, a sub-workflow used as a tool, even another agent as a tool. When you give an agent tools, you are handing it the actions it is allowed to take.

Memory is what survives the loop. Short-term memory is just the running context window, the conversation so far. Long-term memory lives outside the loop in a vector store, a database, or a key-value store, and the agent reads and writes it through tools. Wiring up agent memory is what lets an agent remember a customer across separate runs.

Decision flowchart: plain automation, chatbot, chain or workflow, or agent, based on whether it uses an LLM, takes actions, and who controls the pathPick the simplest shape that fits. Reach for an agent only when the model must choose its own next step.

Agent, chatbot, chain, or workflow: which is it?#

The dividing line is who controls the path. A chatbot only talks. A chain makes one fixed model call. A workflow runs tools along a path you hardcoded. An agent lets the model choose the path at runtime. Same models, four very different shapes, and only the last one loops.

Anthropic draws the cleanest version of this line. In Building Effective Agents, it separates two things: workflows are "systems where LLMs and tools are orchestrated through predefined code paths," while agents are "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks." Predefined path versus self-directed path. That is the whole distinction.

The agent-versus-chatbot split is simpler still. If a system only talks, it is a chatbot: reactive and read-only. If it can decide what to do next and act across tools, it is an agent: goal-driven and able to read, write, and act.

Comparison of a chatbot versus an AI agent across core job, who picks the next step, tools, memory, and model callsIf it only talks, it's a chatbot. If it decides what to do next and acts across tools, it's an agent.

The agent-versus-chain split is concrete in n8n, and it is the difference between two nodes. The Basic LLM Chain node makes a single call to a language model with a prompt; it does not involve tools or loops. The AI Agent node uses a language model to reason and determine which connected tools to invoke, which means it loops and calls the model several times per run. That is the entire difference, and it is why one of them is cheap and the other is not. The full node-by-node walkthrough is in Basic LLM Chain versus AI Agent.

The honest rule of thumb: if you can draw every step in advance, build a chain or a workflow. It is cheaper, faster, and predictable. Reach for an agent only when you genuinely cannot hardcode the path but can still verify progress at each step. Anthropic's own guidance is to find the simplest solution possible, and notes that this might mean not building agentic systems at all.

What do AI agents look like in practice? (n8n examples)#

In practice, an agent is the right call only when the path changes per run. A support bot that decides whether to search docs, check an order, or escalate is an agent. A node that summarizes every email the same way is a chain, even when people call it one. The name should follow the behavior, not the marketing.

Four quick examples, each labeled honestly:

  • Support triage agent. It reads an incoming ticket and decides whether to search the docs with a RAG tool, check order status with an API tool, or escalate to a human. A different path per ticket. That is an agent.
  • "Summarize this email." One model call, fixed path, same shape every time. That is a chain, even though the marketplace template might be named "AI agent."
  • Research agent. Given a question, it searches the web, reads results, decides whether it has enough, searches again if not, then writes an answer. Loop plus tools means agent.
  • Lead-qualification automation that always runs the same three steps in order. The model fills in a field, but it never chooses the path. That is a workflow, not an agent.

Naming it correctly is not pedantry, because the name predicts the bill. A chain makes one model call. An agent makes several per run, so the cost multiplies. Here is the difference modeled on June 2026 Claude list prices, assuming a one-call chain of roughly 500 input and 250 output tokens, and a four-call agent totaling about 4.8M input and 0.8M output tokens per 1,000 runs:

Model (in / out per MTok)Chain ($/1k runs)Agent ($/1k runs)Ratio
Haiku 4.5 ($1 / $5)$1.75$8.80~5x
Sonnet 4.6 ($3 / $15)$5.25$26.40~5x
Opus 4.8 ($5 / $25)$8.75$44.00~5x

The arithmetic is reproducible. On Haiku, the chain is 0.5M input at $1 plus 0.25M output at $5, which is $0.50 plus $1.25, or $1.75 per thousand runs. The agent is 4.8M input at $1 plus 0.8M output at $5, which is $4.80 plus $4.00, or $8.80. The token counts are illustrative, but the shape holds: roughly 5x at the same model. The agent is not better, you are paying a premium for letting the model decide. Spend it only when the decision is real, and when you do, cap agent spend and pick the cheapest model that still passes.

So, do you actually need an agent?#

Reach for an agent only when you cannot draw the steps in advance but can still verify progress at each one. If you can sketch the whole path as a flowchart, build a chain or workflow instead: it is cheaper, faster, and far more predictable than letting the model decide. Use this checklist before you build.

Checklist of five signals that a task needs a real agent rather than a chain or workflowIf you can draw the steps in advance, build a chain. Reach for an agent only when the model has to decide the path.

If you checked most of those boxes, an agent earns its cost. If you did not, you are about to pay the loop premium for a path you could have drawn yourself. The forward-looking hype is real money chasing this: Gartner forecasts that around 40% of enterprise applications will include task-specific AI agents by the end of 2026, but treat that as a vendor-fueled forecast, not a measured fact.

This week, take one automation you already run and name it correctly: automation, chatbot, chain, or agent. The name tells you the cost, the failure modes, and whether you even need the loop. Most of the time, the simplest shape that works is not an agent, and knowing that is the most useful thing this guide can give you.

Frequently asked questions

What is an AI agent in simple terms?
An AI agent is a language model running in a loop that decides its own next action. It reads its situation, picks what to do, does it through a tool, reads the result, and repeats until the goal is met. The model, not your code, chooses each step.
What is the difference between an AI agent and a chatbot?
A chatbot only talks: it answers and stops, and it is read-only. An AI agent decides what to do next and acts across tools to pursue a goal, calling the model several times per task. If it only talks, it is a chatbot; if it acts, it is an agent.
Is an AI agent the same as an automation or a chain?
No. A plain automation and a chain run a path you defined in advance; the model, if there is one, just fills in a step. An agent lets the model choose the path at runtime. The dividing line is who controls the steps: you hardcode them, or the model decides them.
Do AI agents cost more than a simple LLM call?
Yes. A chain makes one model call; an agent makes several per run as it loops, so the bill multiplies, roughly 5x at the same model in a modeled comparison. You pay that premium for letting the model decide the path, so use an agent only when the decision is real.
When should I use an AI agent instead of a workflow?
Use an agent only when you cannot hardcode the path in advance but can still verify progress at each step, and the model must choose among several tools. If you can sketch the whole process as a flowchart, build a chain or workflow; it is cheaper and more predictable.

Sources

Primary references and vendor documentation used while drafting and reviewing this article.

  1. Anthropic, Building Effective Agents (workflow vs agent definition)
  2. n8n docs, Basic LLM Chain node (single call, no tools or loops)
  3. n8n docs, AI Agent (Tools Agent) node (reasons, calls tools, Max Iterations default 10)
  4. Anthropic Claude pricing (per-model input/output rates)

Written by

Muhammad Qasim Hammad
Muhammad Qasim Hammad
AI agents & automationFounder · Cart Gaze LLCPMP-certified PM

Muhammad Qasim Hammad is an AI agent and automation expert and the founder of Cart Gaze LLC (cartgaze.com). He builds product for the love of it: when an idea lands, a working prototype is usually running within hours, built with the same AI agents and automations he sells. He puts his own output at roughly 20× what it was before agents, and the Agentic OS behind this site is the working proof, documented in public with the tools he actually ran and what they really cost.

AI & Automation Services

Want a pipeline like this running in your business?

I'm Qasim — I design and ship AI agents and n8n automations for solo operators and small teams. Tell me what's eating your team's week, and I'll scope a fix.

Related reading