What an AI Agent Is and How It Differs from a Chatbot
How an agent differs from a single model call and from a chatbot, what it is made of, when it is genuinely needed and when it only adds complexity, and what breaks when one reaches production.
All articles in the guide ИИ-агенты · 11
The word “agent” now covers too much. In this guide it means one specific thing: a program that decides in a loop which tool to call next in order to get closer to a goal.
An agent versus a single model call
The difference is not prompt sophistication, it is the presence of a loop.
A single call. Text in, text out. The model does nothing to the world. Classifying a ticket, extracting fields from an email, rewriting a paragraph - one call, and an agent is surplus.
An agent. The model receives a task and a set of tools, picks a tool, sees the result, picks the next, and continues until done. It makes decisions as it goes rather than executing a predefined sequence.
The practical test: if you can draw the process as a flowchart in advance, you need a workflow, not an agent. A workflow is predictable, cheaper and easier to debug. An agent belongs where the next step depends on what the previous one uncovered.
A chatbot, in these terms, is a special case of a single call with message history. It answers; an agent acts.
What an agent is made of
Four parts, all of them mandatory.
A model. It makes the decisions. Different parts of the system can run on different models: analysis on a strong one, mechanical steps on a fast one - see the model router.
Tools. What the agent acts with: a database query, an API call, sending a message, writing a file. The underrated detail: tool descriptions matter more than the prompt. The agent picks a tool by its description, and a vague description means the wrong pick.
Memory. What the agent retains between steps and between runs. Context runs out sooner than people expect - see agent memory.
The loop and its bounds. How many steps are allowed, what counts as done, what happens on error. Without explicit bounds an agent either spins forever or stops halfway and reports success.
When an agent is needed and when it is surplus
Needed:
- The next step depends on the result of the previous one, and there are many options.
- Input arrives unstructured and must be interpreted before anything can be decided.
- The process involves search: finding the relevant thing among many, rather than processing a given one.
- The branch count is too large to express as conditions.
Surplus:
- The process is fully known and stable. That is a workflow - see n8n.
- There is one step. That is a model call.
- Errors are unacceptable and the result cannot be checked automatically.
- The task is a database query. This is the most common form of overengineering.
On cost specifically: an agent costs several times what a workflow costs, because every loop step resends the whole accumulated context. The difference does not show in a demo, it shows at volume.
What breaks in production
The demo almost always works. Other things break.
The agent lies about the result. It reports the task as complete when the tool returned an error. That is not rare, it is the default behaviour: the model completes the plausible ending. The fix is a verification layer that checks the fact rather than the report.
Constraints live in the prompt. “Do not delete data” in a system prompt is a wish, not a constraint. A real constraint is the absence of that tool or that permission. Covered in guardrails and in rollout.
Reruns repeat actions. The agent restarted and sent the email a second time. Idempotency does not appear on its own in agent systems - see idempotent pipelines.
Context runs out. A long task hits the window, part of the history is lost, and the agent proceeds on an incomplete picture without saying so.
Cost grows non-linearly. A task that finished in five steps in testing sometimes takes forty in reality. A step limit is mandatory insurance, not an option.
Where to go next
An order that saves time:
- Building an agent: from prompt to production - the overall shape of the work.
- A step-by-step walkthrough on a real case - what it looks like in practice.
- Rollout: guardrails and verification - before you ship.
- Memory and context and multi-agent designs - when one agent stops being enough.
If the question is money rather than technology: where agents pay off and where they do not. If you want a local stack: local agents and self-hosted models. On framing tasks for a model: prompt layers and the basics. On what agent development looks like as a piece of work.
What this looks like on a real project
A worked example: Megascope, where collection and parsing run automatically and the model handles the part that genuinely requires interpreting unstructured input, rather than the whole process. That is the usual working proportion: an agent inside the process, not instead of it.
If you need a system like that for your own problem, the terms are on the services page.
Neighbouring guides
These four topics describe one ecosystem, and each on its own solves half the problem.
- Claude Code - a development agent in the terminal: for when the machine should write and verify the code while you make the decisions.
- MCP servers - how to give an agent access to your data and systems in one way that works across tools.
- n8n - for when the sequence is known in advance and no agent is needed: workflows are cheaper, more predictable and easier to debug.
In this guide
- Building an AI Agent: From Prompt to ProductionThe path from idea to a working agent: framing the task, choosing tools, the execution loop, testing before launch, and what has to be true before it reaches production.
- How to Build an AI Agent: A Step-by-Step Real CaseOne agent walked through end to end: requirements, design, tools and their descriptions, the first run and the fixes it forced, and which parts deliberately stayed ordinary code.
- AI Agents for Business: Where They Pay Off and Where They Do NotWhich processes an AI agent genuinely makes cheaper, where ordinary automation or a hire wins, how to calculate payback honestly, and the risks that rarely make it into the model.
- AI Agent Development: Stack, Timelines and PitfallsWhat the work of building an AI agent actually consists of, the stack used in practice, where the time goes, and how to accept the result so you get a system rather than a demo.
- Local AI Agents: Self-Hosted Models and StackWhy you would run an agent locally, what hardware it takes, where local models hit their ceiling on agentic work, and why a hybrid split usually beats either extreme.
- Rolling Out AI Agents: Guardrails and VerificationWhy an agent reports success where there is none, how a verification layer works, how a constraint in code differs from one in a prompt, and what to monitor after launch.
- Multi-Agent Systems: When Several Agents Beat OneWhen one agent is not enough, how roles and a coordinator are arranged, how context is passed between agents, and the places where multi-agent designs fall apart.
- AI Agent Memory: Context, Compaction and ArtifactsWhy agent context runs out sooner than expected, what to keep and what to discard, how compaction works, and why file-based memory beats retelling the conversation.
- Prompt Engineering: Layers Instead of ForksWhy a copied prompt per client becomes unmaintainable, how a layered prompt is structured, how to test a change, and why prompts need versioning like code.
- Prompt Engineering Basics for AI AgentsWhat actually drives an agent result, how a system prompt is structured, why tool descriptions matter more than the prompt itself, and the mistakes that keep repeating.
FAQ
How does an AI agent differ from a chatbot?
A chatbot answers a message with text. An agent takes actions: it calls tools, changes data, reaches external systems and decides for itself what step comes next. For a bot the result is an answer; for an agent the result is a change in the world.
Do I need an agent to extract data from text?
Almost never. Extraction is a single model call with a defined response schema. An agent adds a decision loop where there is nothing to decide, and with it non-determinism, latency and extra cost. The rule is simple: if there is one step, you do not need an agent.
What does running an AI agent cost?
Cost has three parts: tokens per loop step, infrastructure, and the labour of investigating failures. The third is the one that gets underestimated: an agent that fails silently costs more than a month of its token spend.
Done for you
I will build an AI agent for a real task
With tools, memory and logs, so it works in production and not only in a demo.
from $1,500 · 1 to 2 weeks