DroidCrunch
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact
Subscribe
No Result
View All Result
DroidCrunch
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact
Subscribe
DroidCrunch

What Is an AI Agent? How Agents Work, With Real Examples 2026

Lokesh Kapoor by Lokesh Kapoor
November 23, 2026
3
0

We asked an n8n agent one question about an unpaid invoice. n8n called the model three times before answering.

We know because the model was a fake we wrote, and it logged every request.

That loop is the plain answer to what is an AI agent: a language model that calls tools, reads the results and picks its next step until a stop rule ends the run.

Below, we take ours apart, then sort real AI agent examples from chatbots wearing the label.

What is an AI agent?

An AI agent is software that uses a language model to choose its next step toward a goal. It takes that step through a tool, checks the result and repeats until the job is done or a limit stops it.

The model is the same kind you chat with in ChatGPT. Only the setup around it changes.

Every working agent has four parts:

  • A model that reads the situation and decides what to do next.
  • Tools it may call, like an API, a database, a calculator, a browser or a phone line.
  • Memory that carries earlier turns and results into the next decision.
  • A stop condition: the job is done, the step budget runs out or a human must approve.

Textbooks go wider. Russell and Norvig’s Artificial Intelligence: A Modern Approach calls anything that senses its surroundings and acts on them an agent, so a thermostat counts.

On a product page in 2026, “agent” means the LLM kind. What does choosing a next step look like from the inside? We watched.

We took an n8n agent apart, one model call at a time

We ran n8n 2.46.6 on our test server and rebuilt the agent from our n8n agent tutorial: a chat trigger, the AI Agent node, an OpenAI-style chat model and Simple Memory.

It had two tools. One was a Calculator. The other, invoice_lookup, queried a fake billing API where invoice INV-2207 belongs to Kestrel Studio, costs $240 and was due on 10 November.

The model was the twist. We wanted to read every message, so we wrote a small OpenAI-compatible server that logs each request and answers from a script.

Read this first: every model reply below was scripted by us so we could watch the loop. A real LLM makes these choices itself, sometimes badly. What we’re showing is n8n’s side: what it sends, when it runs tools and when it stops.

Our question: “Is invoice INV-2207 paid, and how many days overdue is it?”

CallWhat n8n sent the modelWhat came back
1System message, your question and two tool definitions (1,180 bytes)Call invoice_lookup with INV-2207
Tooln8n queried the invoice APIUnpaid, $240, due 10 November, client Kestrel Studio
2All of the above, plus the tool call and the invoice data (1,558 bytes)Call Calculator with 23 – 10
Tooln8n ran the calculator13
3All of the above, plus the calculator step (1,818 bytes)INV-2207 is unpaid and 13 days overdue
n8n 2.46.6, AI Agent node with Simple Memory. The model was our scripted mock, so the choices in the right column were set by us.

Three model calls for one question. Now look at what grew.

Each call resent the system message, the question, the full tool list and every step so far. Requests grew from 1,180 bytes to 1,558, then 1,818. Together, one question sent 3.9 times the text of its first call.

AI agent loop from our n8n test: three model calls, an invoice lookup and a calculator step before the answer
Every call resent the question, the tool list and all earlier steps. The model’s replies came from our scripted mock.

Most of that weight was the tool list. In the first request, two tool definitions filled 862 of the 1,180 bytes, or 73%. Here’s the one n8n built for our lookup tool:

The invoice_lookup tool, as n8n sent it to the model JSON
{
  "type": "function",
  "function": {
    "name": "invoice_lookup",
    "description": "Look up one invoice by its ID (for example INV-2207). Returns client, status, amount and due date.",
    "parameters": {
      "type": "object",
      "properties": {
        "invoice_id": {
          "type": "string",
          "description": "The invoice ID, e.g. INV-2207"
        }
      },
      "required": [
        "invoice_id"
      ]
    }
  }
}

That’s all the model sees of a tool: a name, a sentence and a schema. It never touches the API. n8n runs the request and pastes the result back as a message.

So vague tool descriptions get you vague choices.

Memory and the stop rule: the parts most guides skip

In our test, the surprises came from the two parts nobody demos.

Memory kept less than we expected

We sent a follow-up in the same chat: “Who is the client on it?”

Simple Memory added only part of the earlier turn: the question, the calculator step and the final answer. The invoice lookup, the only step naming Kestrel Studio, was missing.

Our script told the model to answer from memory if the client’s name was there, and to look it up if not. It had to look it up: two more model calls and a second API hit. Raising Simple Memory’s window from 5 to 20 changed nothing.

We saw this on n8n 2.46.6, so test your version. The lesson travels: agent memory is a summary someone else chose, not a recording.

What happens when an agent never finishes

Next, we scripted the model to request a tool every time, so it never answers. n8n’s AI Agent node allows 10 iterations by default. Ours made 10 model calls and 10 API requests, then failed with this:

n8n execution error Plain text
Max iterations (10) reached. The agent could not complete the task within the allowed number of iterations.

The person in the chat saw “Error in workflow”. No partial answer.

Each lap added 374 bytes, so the tenth call sent 4,536. The run sent 28,530 bytes in all, about 24 times its first call. With the cap at 3, it stopped after 3 calls.

That’s the catch with a stop rule. It protects your bill but fails loudly, so decide what the user sees when it trips.

Agent vs chatbot vs workflow: who picks the next step?

A chatbot answers one message at a time. A workflow follows a path you drew. An agent picks its own path through the tools you gave it.

Anthropic’s guide to building agents draws the same line. In a workflow, your code decides the steps. In an agent, the model directs its own process and tool use.

ChatbotWorkflowAI agent
Who picks the next stepYou, one message at a timeYour flowchartThe model, inside limits you set
Can it act in other appsNo, it repliesYes, in a fixed orderYes, in the order it chooses
Typical exampleA support bot that answers FAQsNew lead, add to CRM, send emailTriage a ticket, look up the order, draft the refund
How it usually failsA wrong answerA broken step, loudlyA wrong action, quietly
Many products mix all three. Judge each part by who decides what happens next.

Isn’t a chatbot that searches your docs an agent? Usually not.

Most RAG chatbots run one search per question and reply from what comes back. It becomes an agent when the model decides whether to search, what for and whether to search again.

AI agent vs chatbot vs workflow: who picks the next step in each, with an example of each
The test is who picks the next step: you, your flowchart or the model.

Our AI agents vs traditional automation guide covers when a fixed path wins. Short version: if you can draw the path on a whiteboard, build the workflow.

Types of AI agents: the textbook five and the ones you’ll meet

Computer science sorts agents by how they decide. Product teams sort them by the job. Both lists get called types of AI agents, and they barely overlap.

The textbook types

These five come from the classic AI textbooks, and IBM’s explainer uses the same list.

TypeHow it decidesEveryday example
Simple reflexFixed if-this-then-that rules on what it senses nowA thermostat
Model-based reflexRules plus a running picture of the worldA robot vacuum that maps the room
Goal-basedPlans steps that reach a goalA route planner
Utility-basedWeighs options and picks the best trade-offA dynamic pricing engine
LearningImproves its own rules from feedbackA recommendation feed
The five classic types from AI textbooks. Most LLM agents sit between goal-based and utility-based.

Most LLM agents sit between goal-based and utility-based. They chase a goal and weigh options, but nothing inside them learns between runs unless someone retrains the model.

The types you’ll actually buy or build

  • Coding agents read a codebase, run commands and edit files.
  • Browser agents click through websites and apps the way you would.
  • Voice agents answer a phone line, think and talk back.
  • Workflow agents sit inside an automation tool and handle the steps that need judgment.
  • Research agents search, read and write up what they found.
  • Multi-agent systems split a job between a planner and several workers.

Real AI agent examples, and the loop inside each

The quickest test: find the loop. If the software can’t call a tool, read the result and change course, it’s a chatbot.

Coding agents: Claude Code and Codex

Ask Anthropic’s Claude Code or OpenAI’s Codex to fix a failing test. You’ll watch the loop: read the files, run the tests, edit a function, test again.

The tools are your terminal and files. The stop condition is “tests pass” or “the human says stop”. That’s why coding agents took off first: a test suite tells the model the truth after every step.

Browser agents: ChatGPT’s cloud browser

OpenAI’s help center now says ChatGPT agent “is no longer available” and points to ChatGPT Work, with a cloud browser for website jobs.

The loop survived the rename: open a page, read it, click, check, repeat. Every screen is a fresh observation to read, which is why browser agents are slow to watch. They also stop to ask before payments and other actions you can’t undo.

Voice agents: Vapi and Retell

A voice agent runs the loop mid-conversation. It hears a sentence, decides whether to reply or check a tool like a calendar, then speaks.

Platforms like Vapi and Retell handle the phone line and speech. You bring the prompt and tools. Our AI voice agents guide shows how the pieces connect and what a minute costs.

Weighing up one platform? Our Vapi review covers its features and catches.

AI receptionists

A receptionist is a voice agent with a narrow job: answer, qualify, book, hand off. Its tools are a calendar and a CRM, and its stop rule is a transfer to a human.

That narrow scope is why they work. Our AI receptionist breakdown covers where callers get stuck, and our Retell review covers one platform you can build them on.

Workflow agents in n8n

This is the kind we built. An agent node sits inside an n8n workflow, and everything around it stays fixed: the trigger, the clean-up, the final email.

For most small teams, that’s the right size. The model takes the one step that needs judgment. The workflow does the rest.

Where AI agents break

Agents fail in ways a chatbot can’t, because they act on what they believe.

Agent washing. Gartner counts roughly 130 genuine agentic AI vendors among the thousands using the label. The rest relabel chatbots, assistants and RPA bots.

Gartner also expects more than 40% of agentic AI projects to be scrapped by the end of 2027. Its reasons: cost, unclear value and weak risk controls.

Confident wrong answers. In our agentic AI vs generative AI test, a small local model nailed every lookup, then missed 11 of 12 multi-step money questions and sounded sure each time.

Tool errors become model input. Our first n8n run used an older HTTP tool node that n8n 2.46.6 couldn’t run. n8n didn’t stop. It passed the error text to the model as the tool’s answer and asked what next.

A real model might retry, give up or invent the invoice.

Every lap costs more. A runaway agent bills you for a growing pile of resent text. Our ten-lap test sent 28,530 bytes before the cap stopped it.

Tools reach real systems. An agent with a “send email” or “issue refund” tool can get it wrong a hundred times before anyone looks. Standards like MCP make tools easy to plug in, as our MCP explainer shows. Easy to plug in also means easy to over-share.

Should you build an agent?

Build one when the steps change from case to case and a wrong step is cheap to catch. Skip it when the path is fixed or one mistake costs real money.

Best for: support triage that needs lookups, research write-ups, coding with tests and call booking with a calendar check.

Not ideal for: flowchart jobs, payments, legal or medical calls without a human, and tasks where you can’t tell right answers from wrong ones.

How to start with AI agents without getting burned

Five rules we'd follow on any first agent, in n8n or anywhere else.

  1. 1
    Step 1 of 5

    Draw the path first

    Sketch the job as a flowchart. If every branch is known, build a workflow and stop there. Reach for an agent only for the step where the path changes from case to case.

  2. 2
    Step 2 of 5

    Give it two or three tools

    Name each tool plainly and describe it in one sentence. In our test, two tool definitions were 73% of the first request, and that text is all the model knows about them.

  3. 3
    Step 3 of 5

    Set a low iteration cap

    Start at 3 to 5, not the default 10. Then decide what the user sees when the cap trips, because n8n’s default is a bare error.

  4. 4
    Step 4 of 5

    Gate anything you can't undo

    Payments, deletes and outgoing emails go behind a human approval step. In n8n, that’s human review on the tool connection.

  5. 5
    Step 5 of 5

    Read the logs before you trust it

    Turn on intermediate steps and read a dozen real runs. Check which tools it called, what came back and what made it into memory.

Frequently asked questions

Disclosure: the n8n, Vapi and Retell links on this page are affiliate links. Sign up through one and we may get paid. Your price stays the same.

Is ChatGPT an AI agent?

Plain ChatGPT chat isn’t. It answers one message at a time, and you decide the next step. The agent part is ChatGPT Work, whose cloud browser picks tools, reads results and keeps going on its own until the task is done or it needs your approval.

Is Siri or Alexa an AI agent?

Mostly no, at least in the classic form. They match your request to one fixed action, like setting a timer, and stop. That’s closer to a simple reflex agent. They behave like LLM agents only when a request triggers several steps the assistant chooses itself, checks and adjusts.

Is an AI agent the same as agentic AI?

Nearly. Agentic AI is the approach: a model that plans and acts in a loop. An AI agent is one working system built that way. Vendors use both terms loosely, so judge the product by its loop. Can it call tools, read the results and change course?

How much does it cost to run an AI agent?

You pay per model call, and one agent task makes several. Our test question took three calls where a chatbot needs one, and each call resent the whole conversation. Plan for several times the cost of a single chat reply, plus any paid tools or APIs the agent calls.

Can an AI agent run on my own computer?

Yes. Self-hosted n8n with a local model through Ollama runs entirely on your hardware, with no API bill. The trade-off is quality. In our own tests, small local models fumbled multi-step maths. Start with a narrow job and a low iteration cap.

Do AI agents learn from their mistakes?

Not on their own. The model’s weights don’t change between runs, and memory only carries recent conversation, often trimmed. An agent repeats a mistake until you fix the prompt, the tool description or the model. Learning agents in the textbook sense need a training loop most products don’t have.

What should an AI agent never do without a human?

Anything you can’t undo: sending money, deleting records, emailing customers in bulk or signing up for paid services. Put those tools behind an approval step. n8n’s human review for tool calls pauses the run and asks in Slack, Telegram or chat before the action runs.

Do I need to code to build an AI agent?

No. Visual tools like n8n let you connect a model, tools and memory without writing code. Some comfort with APIs and JSON still helps. Debugging an agent means reading what it sent to the model and what each tool sent back.

The bottom line

So, what is an AI agent? A model, a few tools, some memory and a stop rule, running in a loop. The model only writes requests. Your software does the acting.

Judge the loop, not the label. Most products sold as agents are chatbots or workflows, and for many jobs that’s the better buy. Our agent vs chatbot table is the quick check.

Got a job with changing steps and cheap mistakes? Build a small AI agent with two tools and a low iteration cap. Then read its logs before you trust it.

Summarize this article with AI

Get the key points in seconds. Pick an assistant and it opens in a new tab, ready to go.

ChatGPTClaudePerplexityGoogle AIGrokMistral

Opens in a new tab. Nothing is shared until you pick an assistant.

Share4Tweet2Share1Share
Previous Post

403 Forbidden Error: What It Means and How to Fix It 2026

Lokesh Kapoor

Lokesh Kapoor

I am Lokesh Kapoor who loves to write blogs, create videos and watch sci-fi movies on Netflix and Jio Cinema. DroidCrunch is my first love and a crucial part of my life.

Related Posts

What is web scraping title card: a web page turning into rows of a data table

What Is Web Scraping? How It Works, What It’s Used For, and Its Limits 2026

November 23, 2026
300
How does a VPN work: a laptop sends data through an encrypted tunnel to a VPN server, and the website sees the VPN's IP address

How Does a VPN Work? What Happens to Your Data 2026

November 23, 2026
301
miniOrange MCP review title card with a role and ability grid, an Allow access button and a deny by default chip

miniOrange Secure MCP Server Review 2026: Tight Control, One Catch

Royal MCP review title card with a Recent changes table showing two undone AI edits

Royal MCP Review 2026: We Deleted a Post to Test the Undo

Load More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

DroidCrunch

Tested first. Then written.

Independent software reviews since 2016. Search the archive, or start with a topic.

WordPressAI toolsHostingVPNSEO
  • 630+reviews, comparisons and guides
  • 243product reviews
  • 36topics covered
  • 2016publishing since
home

An independent tech blog and YouTube channel. We use every tool before we rate it, and we always tell you the catch.

Topics

  • WordPress
  • AI tools
  • Hosting
  • SEO
  • VPN
  • Proxies
  • Automation

Company

  • About DroidCrunch
  • Editorial policy
  • Affiliate disclaimer
  • Write for us
  • Contact

Explore

  • All articles
  • Reviews
  • Deals and coupons
  • Black FridayLive
  • Facebook group
  • Help and support

Recently scored

  • miniOrange Secure MCP Server75%
  • Royal MCP80%
  • WPVibe76%
  • Zapier82%
All reviews

Reader-supportedWhen you buy through our links, we may earn a commission at no extra cost to you. It never changes our verdicts. Read our affiliate disclaimer.

© 2026 DroidCrunch. Independent since 2016.

  • Privacy policy
  • Terms
  • Cookie policy
  • Your GDPR rights
  • RSS
Back to top

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
Subscribe
  • About
  • Blog
  • Categories
    • Automation
    • Tech
    • SEO
    • WordPress
    • Software
    • Hosting
    • Proxy
  • AI
    • AI Writing
    • AI Image
    • AI Tool
    • AI Video
  • Deals
  • Contact

© 2026 DroidCrunch - Best Place for Tech NomadPrivacy PolicyTerms & ConditionsCookie PolicyGDPR RightsAffiliate Disclosure

DroidCrunch Giveaway

Amazon Gift Card worth $15

Participate now and get a chance to become a lucky winner to receive the reward.​

Join Giveaway