Lesson 17 of 28 · Making AI useful
What is an AI agent?
An AI agent is software that uses an AI model to work toward a goal by itself: it decides what steps to take, uses tools such as web search, email or a spreadsheet to act, checks the results and keeps going until the task is done or it needs help. A chatbot tells you how to do something; an agent does it.
From answering to doing
A regular chat assistant takes your message and returns text. Everything after that is up to you. An AI agent is given a goal instead of a single question, plus access to tools, and it works through the task in several steps on its own.
Imagine two helpers planning your trip. The first is a well-informed friend on the phone who tells you which flights to look at. The second is an assistant with access to your calendar and a booking site who finds a flight that fits your schedule, holds the seat and asks you to confirm before paying. The second one is acting as an agent.
How an agent works: the loop
An agent has four parts: a model that does the reasoning, tools it can use, a memory of what has happened so far, and instructions and limits set by whoever built it. Those parts work in a loop that repeats until the goal is reached.
An early, influential version of this loop, called ReAct, has the model alternate between reasoning and acting (Yao et al., 2022). In simple terms:
- Plan: the model reads the goal and decides the next step.
- Act: it calls a tool, for example to search the web, read a file or send a message. This is called tool calling.
- Observe: the tool's result is fed back to the model.
- Repeat or finish: it chooses the next step, asks a person, or reports that the task is done.
What an AI agent is not
An agent is not just any chatbot, even though many products use the word loosely. If a tool only answers messages and cannot take actions, it is an assistant, not an agent. An agent is also usually not a robot: most agents are software that acts through apps and websites. And it is not fully independent by default; well-designed agents ask for approval before steps that spend money, delete data or contact people.
Agents are not infallible either. Each step can go wrong, and small errors compound over a long task, which is why agents work best on clearly defined jobs with limited permissions and a person checking the important moments.
Where you meet AI agents
Coding assistants that edit files, run tests and fix the errors they find; browser agents that fill in forms and compare pages; customer-service agents that look up an order and issue a refund within set limits; and research tools that search many sources and write a report. Workflow automation tools also let you add an agent step that decides what to do next instead of following a fixed rule.
Agents connect to tools in different ways. One common way is the Model Context Protocol (MCP), an open standard for plugging tools and data into AI applications, covered in lesson 19.
Example
Worked example: an agent chasing a missing invoice
Worked exampleGoal: Check which of my three suppliers has not sent this month's invoice, and draft a reminder. Step 1 Plan: I need this month's emails from the three suppliers. Act: search_email(from: suppliers, subject: invoice, this month) Observe: invoices found from Supplier A and Supplier B. Step 2 Plan: Supplier C is missing. Find their billing contact. Act: read_contacts(Supplier C) Observe: billing@supplier-c.example Step 3 Act: draft_email(to: billing@supplier-c.example, polite reminder) Step 4 Finish: 'Supplier C has not sent an invoice. A reminder is drafted. Shall I send it?'
Illustrative trace with made-up tool names. Note the last step: the agent stops and asks before sending anything.
Key points
- An AI agent pursues a goal by planning, acting with tools and checking results.
- A chatbot answers; an agent takes actions on your behalf.
- It runs a loop: plan, act, observe, repeat.
- Errors compound over long tasks, so limits and human approval matter.
- Give agents only the permissions the task needs.
Try it on Mindber
Related terms
Related topics
Frequently asked questions
What is the difference between an AI agent and a chatbot?
A chatbot responds to messages with text, and you carry out any actions yourself. An AI agent is given a goal and access to tools, then plans and takes several steps on its own, such as searching, editing files or sending messages, checking results as it goes. Many assistants blend both, answering questions but switching into an agent mode for multi-step tasks.
Are AI agents safe to use?
They can be, with sensible limits. Give an agent access only to the tools and data its task needs, require your approval for anything irreversible such as payments, deletions or messages to other people, and keep a log of what it did. Be wary of agents that read untrusted web pages or emails, which can hide instructions designed to hijack them (prompt injection).
Do I need to code to build an AI agent?
Not necessarily. Many no-code and low-code automation platforms let you add an agent step, connect tools such as email or a spreadsheet, and write its instructions in plain language. Coding gives more control over reliability, testing and security, and developer frameworks exist for that, but a simple agent for a personal or team workflow can often be set up without it.
Sources
- ReAct: Synergizing Reasoning and Acting in Language Models. Yao et al., arXiv, October 2022
- A Survey on Large Language Model based Autonomous Agents. Wang et al., arXiv, August 2023
- Toolformer: Language Models Can Teach Themselves to Use Tools. Schick et al., arXiv, February 2023
Last updated