How AI Works

What is an AI agent?

A plain chatbot only answers you. An agent is an AI that can also use tools (ways to look things up or do things) and choose its own next steps to get a job done. Try one below. It takes about three minutes.

Kitchen workbench1 of 6

This preview runs on a script, so the agent's replies are fixed. The full course uses a live AI.

Chatbot or agent?

A chatbotReplies with words, using what it learned in training and what you type. It can't look anything up or change anything unless it is given a tool for it.
An agentThe same kind of AI, given tools and a goal. It picks a step, uses a tool, reads what came back, and repeats until the job is done or it gets stuck.

It's a sliding scale, and people use the word loosely. Many chat apps can now search the web or run code, which already makes them a little agent-like.

Where you'll meet agents

  • Research assistantsThey search the web, read several pages and write up what they found.
  • Coding toolsThey read a project, change files and run the tests.
  • Inbox and calendar helpersThey work through an inbox, a calendar or a booking site for you.

What can go wrong

  • Wrong steps pile upAn agent can take a wrong step and keep building on it, so check what it did and not only what it says.
  • Mistakes with real toolsAnything it can do, it can do by mistake. Give it only the tools the job needs.
  • Spending and one-way actionsFor steps that cost money or can't be undone, have the app stop and ask you first, as it did above.

AI agents, explained

An AI agent is an AI system that is given a goal and a set of tools, and then decides for itself which steps to take, using the result of each step to choose the next, until the job is done.

In the lesson above, the same AI went from answering “I can’t see your fridge” to planning dinner and ordering groceries. Nothing about the AI changed. It was given tools, and permission to keep going.

The loop that makes an agent

A chat AI answers once. An agent works in a loop: choose an action, look at what happened, choose again. You set the goal; it works out the steps.

One job, step by step

You give it a goal, not instructions.

Plan tonight’s dinner.

It picks a tool. It cannot see your kitchen, so it starts by looking.

look·in·the·fridge

It reads the result. What comes back becomes part of what it knows.

look·in·the·fridgeeggs,·spinach,·rice

It decides what to do next, and repeats. Each result shapes the following step.

look·in·the·fridgefind·recipesadd·soy·sauce·to·the·listadd·spring·onions·to·the·list

It stops when the job is done, or pauses for you. Before spending money, a well-built agent shows you what it is about to do and waits.

look·in·the·fridgefind·recipesadd·to·the·listorder·groceries?
An illustration based on the kitchen lesson above.

Tools are what make it useful

On its own, an AI can only produce text. A tool lets it do something in the world: read a calendar, search the web, edit a file, place an order.

Whoever builds the agent chooses its tools, and that choice sets what the agent can and cannot do. An agent with a fridge tool can look in the fridge. Without an ordering tool, it cannot buy anything, however it is asked.

Why approval matters

An agent acts on what it finds, and what it finds can surprise you. In the lesson, the shop was out of an item and swapped in a pricier one. With no check in place, the agent simply paid.

The usual safeguards are simple. Give the agent only the tools the job needs. Set limits, such as a budget. And make it pause for a person before anything costly or hard to undo.

Where you will meet agents

  • Coding assistants that read a project, make changes across files and run the tests.
  • Research tools that search, read many sources and write up what they found.
  • Customer support that looks up an order and issues a refund within set rules.
  • Assistants that use a browser or computer to fill in forms and book things for you.

Common questions

What is the difference between a chatbot and an AI agent?

A chatbot answers with text and stops. An agent can also act: it is given tools, chooses which to use, looks at what came back and decides what to do next, repeating until the job is done. The same AI can be either, depending on whether it has been given tools and room to take several steps.

What is a tool, for an AI agent?

A tool is anything the agent is allowed to use beyond writing text: searching the web, reading a file, sending an email, running code, placing an order. The people who build the agent decide which tools it has.

Are AI agents safe to use?

It depends on what they are allowed to do. An agent that can only read is low risk. One that can spend money, send messages or delete things can do real harm if it gets a step wrong. Sensible setups give an agent only the tools the job needs and ask a person to approve anything costly or hard to undo.

Can an AI agent make mistakes?

Yes. It can misread a result, pick the wrong tool, or carry on confidently after an earlier slip. Because it takes many steps, a small error early on can grow. That is why checking its work, and approvals for important actions, matter.

What does human in the loop mean?

It means a person reviews or approves certain steps before they happen. In the lesson above, the agent pauses and shows you the order and the price before any money is spent. That pause is a human in the loop.

Do AI agents use a different kind of AI?

Usually not. Most agents are built on the same AI models that power chat apps. What makes it an agent is the setup around the model: a goal, a set of tools, and a loop that lets it keep going until it is finished.

Last updated

Get the next lesson when it opens. Coming next is "What is an AI hallucination?". We'll email you when it's ready.
We use your email only to tell you when new lessons and the full course open. Privacy