An AI agent picks its own steps, uses tools and checks its work. See how agents differ from chatbots and automation, where they fit, and how to keep control.
Almost every software company now says it sells an AI agent. Some do. Others have added a chat box to an old product. If you run a business team, you need to tell the two apart before you spend money.
This guide explains what an agent is, how it works and what can go wrong. The examples are everyday ones, made up for this guide, not Dapton client results. We build AI agents, automations, MCP servers and chatbots, and our engineers review AI-built work.
What is an AI agent?
An AI agent is software that works toward a goal on its own. You tell it what you want done. It decides the steps and uses other software to carry them out. After each step it looks at what happened. It carries on until the job is finished. If it gets stuck, or the next step is risky, it asks a person.
The thinking part is a large language model, or LLM. An LLM is the kind of AI that reads and writes text. Claude, Gemini and OpenAI's GPT models are examples. On its own, an LLM can only write words. It cannot open your invoice system or send an email. An agent adds tools to act with, a memory and rules about what it may do.
A new hire on your team works in a similar way. You don't hand them a script for every case. You say, 'Please sort out this refund request.' They work out what to look up and check with you when unsure. An agent works the same way, with less common sense and more patience.
Here is a small example. A customer writes, 'Where is my order?' A basic chatbot replies with a link to the help center. An agent looks up the order in your shop system. It reads the carrier's tracking page and sees the parcel is two days late. It drafts an apology with the new date and puts it in front of a support person to approve.
How does an AI agent work?
Inside, an agent runs a loop. Anthropic, the company behind Claude, describes an agent as a model that uses tools based on what it finds, step after step. The loop has six moves.
- Goal. A person or another system gives the agent a task, such as 'resolve this support ticket.'
- Think. The model reads the goal and everything it has learned so far. Then it picks the next step.
- Act. It asks to use a tool, such as searching the help center or looking up an order.
- Observe. The tool sends back a result, and the agent reads it.
- Check. The agent asks itself whether the goal is met. If not, it goes back to Think with the new information.
- Stop or ask. When the job is done, it hands over the result. If it is blocked, unsure or about to do something risky, it asks a person.
A tool is a small piece of code the agent is allowed to call, such as 'search orders' or 'create ticket.' The model never runs the tool itself. It writes a short request that names the tool and the details, like an order number. Your own application runs that request and sends the result back to the model.
This matters for safety. Your application sits in the middle, so it can refuse a request, ask a person first or write a log entry. The model asks. Your software decides.
Good agents also have rules for when to stop. A common one is a limit on the number of steps per task. Otherwise a confused agent can call the same tool over and over. IBM's guide to agents names these loops as a known weakness.
What are the parts of an AI agent?
Most agents are built from the same five parts. If you talk to a vendor or an engineer, these are the words you will hear.
- Model. This is the LLM that reads, reasons and decides. Larger models handle harder tasks; smaller ones cost less.
- Tools. These are the actions the agent can take. Some tools only look things up, like reading a customer record. Others change things, like sending a refund. That difference decides how much risk you are taking.
- Instructions. This is the agent's job description. It says what the agent is for, which steps to follow and what to do with odd cases. Good ones often come from procedures your team already uses.
- Memory. Short-term memory holds the work done so far on this task. Long-term memory holds saved facts, such as which plan a customer is on. Memory is stored text the system shows the model again. In a well-built system, you can read and delete it.
- Approval and logs. These are rules about when a person must say yes, plus a record of every action. This part is less exciting than the model, but it is what lets you trust an agent at work.
You will also hear about MCP, the Model Context Protocol. It is an open standard that gives AI apps one shared way to connect to data and tools. Its documentation compares it to a USB-C port for AI. We build MCP servers so an agent can reach a client's systems through one standard connection, with clear limits on what it can touch.
What is the difference between an AI agent, a chatbot and automation?
People often mix these three up and buy the wrong thing. Each fits a different problem.
- A chatbot answers questions. You ask, it replies, and you drive every turn. A basic one cannot act in your other systems.
- An automation follows a fixed path. For example: 'When an invoice email arrives, save the PDF and add a row to the spreadsheet.' A developer sets the steps in advance. It is fast, cheap and predictable, but it breaks when an input doesn't match the rule. It can include an AI step, such as reading a messy PDF, and still be an automation, because the route never changes.
- An agent chooses its own path. You give it a goal and some tools. The model picks the order of steps based on what it finds. That helps when every case is a bit different. Each task costs more, takes longer and is harder to predict.
Invoices show the difference well. A chatbot tells you what a pasted invoice says. An automation pulls the amount and supplier from every invoice email and files them the same way. An agent gets a goal: 'make sure this invoice is ready to pay.' It finds the purchase order and notices the invoice total is higher. It drafts a question to the supplier and waits for the reply.
Anthropic's guide makes the same split. In a workflow, code decides the path. In an agent, the model decides. Good systems often use both: a fixed workflow for the predictable steps, an agent only where judgment is needed.
How do businesses use AI agents?
Here are four common uses, again general examples rather than client results. Each has several steps, messy input and a clear finish line.
- In a support inbox, it reads a message, finds the account, checks your policy and drafts a reply. Hard cases go to a person.
- In accounts payable, it matches invoices to purchase orders. It flags mismatches and lines up the rest for approval.
- For scheduling, it checks calendars, suggests times and sends the invite once someone confirms.
- For staff questions, it answers from your policy documents and links to the source.
OpenAI's guide to building agents offers a test for choosing tasks. Look for work that needs judgment, like deciding whether a refund is fair. Look for rules so tangled nobody wants to update them. Or look for lots of free text, such as emails. If your task has none of these, a simpler tool will probably do.
What are the risks of AI agents?
An agent can take real actions, so its mistakes can have real effects. These are the problems we plan for on every project.
- Confident wrong answers. The model can misread a document or make up a detail. The next step may then build on that mistake.
- Wrong actions. An agent that can send email can send the wrong email.
- Loops and cost. A stuck agent may repeat the same step, burning time and money.
- Prompt injection. Someone hides instructions in content the agent reads, like an email or a web page, and the model may follow them. OWASP, a well-known security community, lists it first (LLM01) in its 2025 top-10 list for LLM applications.
- Too much access. OWASP calls this 'excessive agency.' It names three causes: the agent has too many tools, too many permissions, or too much freedom to act without a check.
- Data leaks. Developer Simon Willison warns about one risky mix: an agent that sees private data, reads content from outsiders and can send information out. With all three, an attacker can trick it into sending your data away.
How to keep people in control of an AI agent
One safeguard is never enough. Security researchers point out that telling the model 'ignore hidden instructions' does not stop every attack. So we use several controls together.
- Least access. Give the agent only the tools and permissions the task needs. Start read-only, and give the agent its own account, not a person's login.
- Approval for risky actions. Reading and drafting can run on their own. Paying, emailing customers or deleting data should wait for a person to click yes.
- Limits. Set a maximum number of steps, a time limit and a spending limit for each task.
- Logs. Record every tool call and its result, so someone can see what happened.
- Tests on real cases. Run the agent on examples from your own work before it touches live data. Run them again after every change.
- An easy way out. When unsure, the agent hands the case to a person with notes instead of guessing.
On our projects we start with one task and log every action. An engineer reviews AI-built work before it ships. The code lives in your own repositories, so you can read what the agent is allowed to do.
When should you not use an AI agent?
Anthropic's guide gives a simple rule: find the simplest solution that works, and add complexity only when it clearly helps. Sometimes the simplest solution has no agent in it.
- If the steps never change, use a fixed automation. It is cheaper, faster and easier to check.
- If the task is one step, such as summarizing a document, one call to a model is enough.
- If a mistake would be costly and nobody can check the result, keep a person doing the work.
- If you can't say what 'done' looks like, the agent can't either.
- If speed matters more than flexibility, skip the agent. Agents take more steps, so they cost more and run slower.
How do you build your first AI agent?
A small, boring task is a better start than a big, exciting one. Look for something that happens often, fits on one page of instructions and has a result you can check.
- Pick one task with a clear start and a clear end. Sorting incoming support emails is a good example.
- Write down what a good result looks like. Collect real examples, including the awkward ones.
- List the tools the agent needs and the smallest access each one requires. Mark which tools only read.
- Build a version that only drafts. The agent prepares the work, and a person approves every single item.
- Measure it on real cases: how often it is right, how long each task takes and what each run costs.
- Give it more freedom slowly. Once the numbers hold up, let it act alone on low-risk steps. Keep approvals on the rest.
This is how we work at Dapton: one task, the smallest access that works, and results you can see before we add more.
Common questions
Is ChatGPT an AI agent?
Chat apps like ChatGPT can include agent features. Look at what the system does. If it only answers your questions, it is a chatbot. If it searches, reads, updates a record and checks its own work to reach a goal, it is acting as an agent.
Will an AI agent replace my team?
We design agents to take repetitive steps, like looking up an order or copying numbers from a PDF. People keep the decisions, the unusual cases and the customer relationships. Someone also has to review the agent's work.
Does an AI agent learn from its mistakes?
Not on its own. The model itself does not learn from your chats unless it is retrained. What can change is the agent's memory, instructions and tools. Your team updates those after reading the logs. If it keeps getting refunds wrong, someone fixes the instructions.
What do we need before we start?
You need one task with an owner who knows how it should go. You need access to the systems it touches, and a handful of real examples. You don't need a big AI strategy.
To sum up: an agent is a model in a loop, with tools to act and people who set the limits. Pick one task. Let the agent draft before it acts. Read the logs, and give it more only when the results earn it.
Documentation and references
- Anthropic: Building effective agents ↗
- Anthropic: Tool use with Claude ↗
- Anthropic: Writing effective tools for agents ↗
- OpenAI: A practical guide to building agents ↗
- IBM: What are AI agents? ↗
- AWS: What are AI agents? ↗
- Model Context Protocol: What is MCP? ↗
- OWASP GenAI: LLM01 Prompt injection ↗
- OWASP GenAI: LLM06 Excessive agency ↗
- Simon Willison: The lethal trifecta for AI agents ↗
Working with AI agents and Agentic AI? Tell us what you’re building and our engineers will tell you how they would approach it.
Talk to our team →