Module 1 · AI Agents Foundations
What an AI agent is
Meet Ọja Electronics, a busy gadget shop in Computer Village, and learn the difference between a chatbot, an automation and an AI agent, with everyday examples of each.
About 30 minutes
The problem
Ọja Electronics sells phones, laptops, inverters and accessories from a shop at 14 Otigba Street, Computer Village, Ikeja. Most customers never visit the shop. They send a WhatsApp message: "How much is Tecno Spark 30?", "Where is my order?", "Do you deliver to Lekki?"
Mrs Adaeze Okafor, who owns the shop, has three staff answering messages between selling at the counter. She kept a record of every message in October, and it shows the problem:
- More than half of the messages arrived when the shop was closed: late at night, early in the morning, or on a Sunday.
- Customers who wrote after hours waited hours for a reply, and some never got one. Many of them bought from the next shop instead.
- Her staff spent about 61 hours that month typing answers, mostly the same answers to the same questions.
Mrs Okafor has heard about AI agents and wants to know: could one answer her customers at 11pm, check their orders and take new ones, without embarrassing the shop? This programme answers that question properly. You'll start without any code, then build a real agent in Python, connect it to WhatsApp and a phone line, and finish by testing and launching it safely.
In this first lesson you'll learn what an agent actually is, and what it isn't.
The concept
Three kinds of "AI helper"
People use the word agent for many things. It helps to separate three ideas.
1. A chatbot answers questions in conversation. You type, it replies. ChatGPT, Claude and Gemini in their plain form are chatbots. Ask "What is a good phone under ₦200,000?" and you get a sensible answer, but the chatbot can't see Ọja's stock, can't check your order, and can't do anything in the world. It talks, but it can't act.
2. An automation follows the same fixed steps every time something happens. "When an order is paid, send the customer a receipt and alert the dispatch rider." Tools such as Zapier, Make and n8n build these without code. Automations are fast and reliable, but they can't think: if a customer writes "I paid but the alert hasn't come, abeg check", a fixed automation has no step for that. It acts, but it can't think.
3. An AI agent is given a goal and decides for itself which steps to take to reach it. It uses tools (look up an order, check stock, create a payment link), looks at what each tool returns, and keeps going until the goal is met or it needs a person. It thinks and acts.
A simple test
Ask: who decides the next step?
| Who decides the next step | Example at Ọja | |
|---|---|---|
| Chatbot | nobody: it only replies | "Delivery to Lekki is ₦5,000 to ₦6,000." |
| Automation | the person who built it, in advance | Order paid → send receipt → alert rider |
| Agent | the AI, one step at a time, within limits you set | Reads "where is my order OJ204811?", decides to look the order up, reads the result, replies |
An agent at work
A customer writes at 10:40pm: "Good evening. I ordered a power bank on Monday, OJ204811. Is it coming tomorrow?"
An agent might:
- Think: the customer wants the status of an order and gave the number.
- Act: use the find order tool with OJ204811.
- Observe: the tool says the order was dispatched today and arrives tomorrow.
- Reply: "Good evening! Your power bank (OJ204811) left our shop today and should reach you tomorrow."
Nobody wrote those four steps in advance for this customer. The agent chose them. For a different message, "Do una get iPhone 13 UK used?", it would choose different steps: check stock, then reply in a friendly way, perhaps in Pidgin.
Agents aren't magic
An agent is a language model (the same kind of AI as ChatGPT or Claude) plus instructions, tools and a loop. It can be wrong, it can misunderstand, and it can be tricked. That's why good agents have limits: what they may do alone, what needs a person's approval, and when to hand over. You'll design these limits throughout the programme.
Where you've already met agents
- Customer service assistants on bank and airline apps that can actually change a booking or block a card.
- Coding agents such as Claude Code that read files, run tests and fix code.
- Research agents that search the web, read pages and write a report.
- Shopping and booking agents that compare options and fill in forms for you.
Your project for the programme
Across the programme you'll build Ọja's WhatsApp sales and support agent: one that answers questions from the shop's approved answers, checks orders, quotes prices, takes orders with a secure payment link, and hands complaints to a person. This course does it without code; later courses build it properly.
Example
Here is a sample of Mrs Okafor's October inbox. Each row is one customer message.
| message_id | received_at | channel | intent | after_hours | minutes_to_reply | outcome |
|---|---|---|---|---|---|---|
| IN0001 | 2026-10-01 07:34 | place_order | yes | 560 | order_placed | |
| IN0002 | 2026-10-01 07:59 | product_question | yes | 499 | answered | |
| IN0003 | 2026-10-01 08:19 | product_question | yes | 253 | answered |
The first customer wanted to place an order at 7:34am, before the shop opened, and waited 560 minutes, more than nine hours, for a reply. An agent could have answered in seconds.
The column intent says what the customer wanted. automatable (not shown above) is Mrs Okafor's judgement of whether an agent could handle it: full, with_human (an agent drafts, a person approves) or no.
Walkthrough
You'll use Google Sheets throughout this course: it's free and works in a browser. Excel works just as well.
- Download the dataset from the Practice section below and unzip it.
- Go to sheets.google.com, create a blank spreadsheet, then choose File → Import → Upload and upload inbox.csv. Choose Replace spreadsheet.
- Click any cell in row 1, then Data → Create a filter. Small filter buttons appear on each column heading.
- Use the filter on channel to show only whatsapp. The count of rows appears at the bottom right when you select the message_id column.
- Clear the filter. Now filter after_hours to yes and look at the minutes_to_reply column. Notice how long these customers waited.
- Read ten messages' intent and outcome. For each one, ask: would a chatbot, an automation or an agent be the right helper?
Practice
Practice
How many messages in October came through WhatsApp?
Practice
What percentage of all messages arrived after hours? One decimal place.
Task
6 minFor each situation, say whether it needs a chatbot, an automation or an agent, and give a one-line reason. One per line.
- Send every customer a thank-you message 3 days after delivery.
- A customer asks what "UK used" means.
- A customer writes "I want 2 of the Oraimo power banks delivered to Yaba, how much in total?"
- Every Monday, copy last week's orders into a sheet for the accountant.
Your work is checked for
- Four lines, one per situation
- Uses the words automation, chatbot and agent
- Gives reasons (because, since, the steps, needs, decide…)
- Long enough to give reasons (at least 30 words)
Check your understanding
Answer every question to check.