The Short Answer
What is an AI agent?
An AI agent is software in which a language model decides what to do next, calls tools such as search, a database or an API to do it, looks at the result, and repeats until the task is finished. A chatbot answers a message. A workflow follows steps a developer wrote. An agent chooses its own steps, which makes it useful for open-ended tasks and harder to predict.
The word is used loosely. Many products sold as agents are fixed workflows with a model in one or two steps, and that is often the right design. Anthropic’s engineering guidance, Building effective agents, draws the line clearly: in a workflow the code decides the path, and in an agent the model does. It also advises starting with the simplest design that works and adding autonomy only when the task needs it.
Read the transcript
Most products sold as AI agents aren’t agents. They’re fixed workflows, with a model in one or two steps. And that’s often the right design. A chatbot answers a message. A workflow follows steps a developer wrote. An agent chooses its own steps, and uses tools to take them. That makes it useful for open-ended work. And harder to predict. So when do you actually need one? Here’s the test. Can you draw the task as a flowchart before it starts? If you can, build a workflow. It’s cheaper, faster and easier to test. If the path depends on what’s found along the way, build an agent. Then build it in this order. Pick one narrow task. Give it a few clear, read-only tools. Collect real test cases. Put every action that writes behind a person’s approval. And cap the steps and the spend. Three risks matter most. Text the agent reads can hijack it. Too much access turns a mistake into damage. And models state wrong answers with total confidence. Start with the simplest thing that works. Add autonomy only when the task needs it. The full guide is free at loomstrat.com.
Agent, Workflow or Chatbot
| Chatbot | AI workflow | AI agent | |
|---|---|---|---|
| Who decides the steps | Nobody; it replies to each message | The developer, in code | The model, at run time |
| Uses tools | Sometimes, for lookup | Yes, at fixed points | Yes, whenever it chooses |
| Predictability | High | High | Lower |
| Cost per task | Low | Low to medium | Higher; many model calls |
| Best for | Questions and answers | Repeatable tasks with known steps | Tasks where the steps cannot be known in advance |
| Example | Answering a returns question | Classify an invoice, extract fields, post to accounts | Investigate why a customer was double charged and draft the fix |
A useful test: can you draw the task as a flowchart before it starts? If you can, build a workflow. It will be cheaper, faster and easier to test. If the path depends on what is found along the way, an agent may be justified.
How an Agent Works
Every agent has the same four parts.
- A model. The language model that reads the task and decides the next action.
- Tools. Functions the model can call: search the knowledge base, read an order, send an email, run a query. The Model Context Protocol is an open standard for describing tools so that they can be shared between agents.
- A loop. The model acts, reads the result and decides again. The loop ends when the model says the task is done, or when a step limit or budget is reached.
- Memory and context. The instructions, the conversation so far and any facts the agent has saved to use later.
Most of the engineering effort goes into the tools. A model with clear, well-named, well-documented tools makes good decisions. A model with vague tools makes mistakes that look like poor reasoning.
Where Agents Pay Off
| Area | What the agent does | Why an agent fits |
|---|---|---|
| Customer support | Reads the ticket, checks the order and policy, resolves or drafts a reply | Each case needs different lookups |
| Software engineering | Reads a codebase, makes a change, runs the tests, fixes failures | The work is checked automatically by tests |
| Research and analysis | Searches many sources and writes a cited summary | The number of searches is not known in advance |
| Sales operations | Researches an account and prepares a briefing before a call | Sources differ for every company |
| Finance operations | Matches payments to invoices and investigates exceptions | Exceptions do not follow one path |
| Internal help desk | Answers staff questions and performs routine requests | High volume and clear permissions |
The strongest cases share three things: the task has a clear definition of done, a mistake can be caught before it causes harm, and a person currently spends real time on it. Our guide to human-in-the-loop AI explains how to design the review step.
How to Build Your First Agent
- 1
Pick one narrow task
Choose a task a person does many times a week, with a clear finish. “Resolve refund requests under £50” is a task. “Handle support” is not.
- 2
Write down how a person does it
List the systems they open, the rules they apply and the cases they escalate. This becomes the instructions and the tool list.
- 3
Try a workflow first
If the steps are the same every time, write them in code and use the model for the judgement steps only. Stop here if it works.
- 4
Build a small set of tools
Start with read-only tools. Give each one a plain name, a clear description and a strict input format. Return errors the model can act on.
- 5
Collect test cases before you tune
Gather 30 to 50 real examples with the correct outcome. Run every change against them. Without this you are judging by impression.
- 6
Add write actions behind approval
Let the agent draft the refund, the email or the record change, and have a person approve it. Remove the approval only for actions with a low cost of error.
- 7
Set limits
A maximum number of steps, a spending cap per task and a timeout. An agent in a loop can run up a bill quickly.
- 8
Log everything
Record each model call, tool call and result so that any outcome can be explained afterwards.
- 9
Release to a few users and measure
Track completion rate, escalation rate, cost per task and how often a person corrects the result.
Risks and Guardrails
Agents fail in ways ordinary software does not. The OWASP Top 10 for LLM applications lists the main ones. Three matter most for a first build.
- Prompt injection. Text the agent reads, such as an email or a web page, can contain instructions that redirect it. Treat everything the agent reads as untrusted, and never let read content alone trigger a sensitive action.
- Excessive agency. An agent with more permissions than the task needs can do more damage when it goes wrong. Give it the narrowest access that works, and a separate identity so its actions can be audited.
- Confident errors. Models state wrong answers fluently. Require the agent to cite the record or document it relied on, and check a sample.
If the agent handles personal data, UK data protection law applies as it does to any other system. The ICO’s guidance on AI covers lawful basis, transparency and decisions made without human involvement.
What Agents Cost
An agent costs more to run than a single model call because it makes many calls, and each call re-reads the growing context. The bill depends on the model, the number of steps and how much text each step carries. Three things keep it under control: use a smaller, cheaper model for simple steps, cache the instructions and tool definitions that repeat, and cap the steps.
Build cost is mostly integration. Connecting the agent safely to your order system, CRM or accounts package takes more time than the agent logic. Our AI feature integration guide covers model choice and cost in more detail.
Buy or Build
- Buy when the task is common and a product already does it, such as a support agent inside your help desk tool.
- Configure when a platform lets you describe the task and connect your tools without code, and the task is internal and low risk.
- Build when the agent must work inside your own product, use your own data and rules, or do something that sets you apart.
If you are weighing a custom agent, talk to us. We build agents as part of custom software projects and will say so when a simple workflow would do the job.
Frequently Asked Questions
What is the difference between an AI agent and a chatbot?
A chatbot replies to messages. An agent decides on a series of actions, uses tools such as databases and APIs to carry them out, and continues until the task is complete.
Do I need an AI agent or a workflow?
If you can draw the steps as a flowchart in advance, build a workflow. Use an agent only when the steps depend on what is discovered during the task.
Are AI agents safe to use with customer data?
They can be, with narrow permissions, human approval for sensitive actions, full logging and the same data protection controls as any other system that processes personal data.
How much does it cost to build an AI agent?
It depends mainly on how many systems it must connect to. The agent logic is the small part; safe integrations, test cases and monitoring are most of the work.
What is the Model Context Protocol?
An open standard for describing tools and data sources so that AI models can use them. It lets one integration serve several agents.
Can an AI agent replace an employee?
Agents take over well-defined, repeatable tasks. People remain responsible for judgement, exceptions and approving actions that carry risk.