Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
โ† AI and Automation Level Two ยท Lesson 5 of 9

Module Four

๐Ÿ“– Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
5
Module 4 ยท AI and Automation Level Two

Module 4: Introduction to AI Agents

Module Introduction

Welcome to Module 4 of "AI and Automation Level Two"! In Module 1, we reviewed the basics. In Module 2, we built advanced automation workflows. In Module 3, we learned advanced prompt engineering. Now, we are going to explore something very exciting โ€“ AI Agents.

So far, we have been using AI to answer questions or follow instructions. But AI Agents are different. They are not just answering questions. They are taking action. They can plan, make decisions, and even use tools. They can work on their own to achieve a goal.

Think of an AI Agent like a helpful robot assistant. You give it a task, and it figures out how to do it. It might break the task into smaller steps. It might search for information. It might even ask you questions if it gets stuck. Agents are the next level of AI. They are like a smart friend who can get things done.

In this module, we will learn what agents are, how they work, and how to build them. We will explore different types of agents and their capabilities. By the end of this module, you will be able to design your own simple AI agent. Let us get started!


Learning Objectives

By the end of this module, you will be able to:

  • Explain what an AI Agent is in your own words.
  • Understand the difference between assistive AI and agentic AI.
  • Identify different types of agents (single-agent, multi-agent).
  • Understand the architecture of an AI agent (perception, reasoning, action).
  • Describe common agent design patterns (reflection, tool use, planning).
  • Build a simple research agent using a no-code tool.
  • Understand how to evaluate agent performance.

Warm-up Story: The Research Assistant

In a university in Abuja, there was a student named Ngozi. She had a big research project to complete. She had to read many articles, take notes, and write a report. It was going to take many hours. She was feeling overwhelmed.

Her friend, Chidi, who was learning about AI, said, "Ngozi, I can help you. I can build you an AI Agent that will do the research for you."

Ngozi was surprised. "An AI Agent? What is that?"

Chidi explained, "It is like a personal assistant. You give it a topic. It will search for articles, read them, summarize them, and even write a draft of your report. It uses AI to think and act on its own."

Chidi built the agent. He gave it a simple instruction: "Research the impact of climate change on farming in Nigeria."

The agent went to work. It searched the web. It found articles. It read them. It took notes. It summarized the key points. Then, it wrote a draft report. All of this happened in a few minutes. Ngozi was amazed.

The agent even asked her questions. "Do you want more detail on crop yield or on soil health?" It was like having a smart research assistant.

Ngozi used the agent's work to finish her project. She got an A+. She told everyone about the amazing AI Agent that helped her.

What can we learn from this story? AI Agents are like smart assistants that can do complex tasks on their own. They can research, plan, and take action. They can save you time and help you achieve your goals.


Main Lessons

Lesson 1: What is an AI Agent?

An AI Agent is a system that uses AI to achieve a goal. It can perceive its environment, think about what to do, and take action.

Definition: An AI Agent is a program that can act autonomously to achieve a goal.

Why it is important: Agents can do complex tasks without needing step-by-step instructions.

Simple explanation: Imagine you give a task to a friend. They figure out how to do it. They break it down into steps. They get the work done. An AI Agent is like that friend.

Real-life example: A chatbot that can book a restaurant for you. You say "Book a table for dinner," and it does it.

School example: An AI that can help you study. You say "Help me study for the history test," and it creates a study plan.

Home example: A smart assistant that orders groceries. You say "We are out of milk," and it orders it.

Nigerian example: An AI that helps a farmer. You say "Check the crops," and it flies a drone to take pictures.

Illustration (ASCII):

   +-------------------+
   |   AI AGENT        |
   +-------------------+
   | Goal: Achieve a   |
   | task              |
   | Perceives ->      |
   | Thinks -> Acts    |
   +-------------------+

Mini summary: An AI Agent is a system that acts autonomously to achieve a goal. It perceives, thinks, and acts.


Lesson 2: Assistive AI vs Agentic AI

There is an important difference between Assistive AI and Agentic AI. Assistive AI helps you. Agentic AI acts on its own.

Definition: Assistive AI responds to commands. Agentic AI takes initiative.

Why it is important: Agentic AI is more powerful because it can do things without you telling it every step.

Simple explanation: Assistive AI is like a calculator. You press buttons, it gives answers. Agentic AI is like a robot. You say "clean the room," and it figures out how to do it.

Real-life example: Siri is assistive. You ask a question, and it answers. A self-driving car is agentic. You say "drive me home," and it does.

School example: A spelling checker is assistive. An AI that writes an entire essay for you is agentic.

Home example: A timer is assistive. A robot vacuum is agentic.

Nigerian example: A weather app is assistive. An AI that plans your farming schedule is agentic.

Illustration (ASCII):

   +-------------------+
   | ASSISTIVE AI      |
   | Responds to you   |
   +-------------------+
   | AGENTIC AI        |
   | Takes initiative  |
   +-------------------+

Mini summary: Assistive AI responds to you. Agentic AI acts on its own.


Lesson 3: How an Agent Works โ€“ The Architecture

An AI Agent has three main parts: Perception, Reasoning, and Action. This is similar to the Sense โ†’ Think โ†’ Act cycle we learned before.

Definition: The architecture is the structure of an AI agent.

Why it is important: Understanding the architecture helps you build and design agents.

Simple explanation: Think of it like a person. Perception is seeing and hearing. Reasoning is thinking. Action is doing.

Real-life example: A self-driving car perceives the road with cameras (perception). It thinks about traffic and decides when to turn (reasoning). It turns the wheel (action).

School example: You read a question (perception). You think about the answer (reasoning). You write the answer (action).

Home example: Your smart thermostat senses the temperature (perception). It decides if it is too hot or cold (reasoning). It turns on the AC (action).

Nigerian example: An AI drone for farming. It takes pictures of the crops (perception). It decides which areas need water (reasoning). It tells the irrigation system to turn on (action).

Illustration (ASCII):

   +--------+     +--------+     +--------+
   |PERCEIVE|---->| REASON |---->|  ACT   |
   | (Sense)|     | (Think)|     | (Do)   |
   +--------+     +--------+     +--------+

Mini summary: An AI Agent has three parts: Perception, Reasoning, and Action.


Lesson 4: Types of Agents โ€“ Single-Agent

A single-agent system has one AI agent that works on its own. It is the simplest type of agent.

Definition: A single-agent system has one agent that performs tasks independently.

Why it is important: Single-agent systems are easier to build and are used for many simple tasks.

Simple explanation: Imagine one person working on a project by themselves. That is a single agent.

Real-life example: A chatbot that answers customer questions.

School example: An AI that helps you with math problems.

Home example: A smart speaker that plays music.

Nigerian example: An AI that helps farmers identify crop diseases.

Illustration (ASCII):

   +-------------------+
   |   SINGLE AGENT    |
   |   (One agent)     |
   +-------------------+

Mini summary: A single-agent system has one agent working on its own.


Lesson 5: Types of Agents โ€“ Multi-Agent Systems

A multi-agent system has multiple AI agents that work together. They can cooperate, share information, and divide tasks.

Definition: A multi-agent system has multiple agents that work together to achieve a goal.

Why it is important: Multi-agent systems can handle more complex tasks than single agents.

Simple explanation: Imagine a team working on a project. One person does research, another writes, and another edits. They work together. That is a multi-agent system.

Real-life example: A self-driving car system might have separate agents for navigation, obstacle detection, and speed control.

School example: An AI system where one agent creates a study plan, another finds resources, and another tests your knowledge.

Home example: A smart home system where one agent controls lights, another controls temperature, and another controls security.

Nigerian example: A farming system where one agent monitors soil, another controls irrigation, and another tracks weather.

Illustration (ASCII):

   +-------------------+
   |   MULTI-AGENT     |
   |   (Team of agents)|
   +-------------------+
   | Agent 1  Agent 2  |
   | Agent 3  Agent 4  |
   +-------------------+

Mini summary: A multi-agent system has multiple agents working together as a team.


Lesson 6: Agent Design Patterns โ€“ Reflection

Reflection is when an agent looks back at its own work and thinks about how to improve. It is like self-review.

Definition: Reflection is when an agent evaluates its own output and improves it.

Why it is important: Reflection helps agents get better over time. They learn from their mistakes.

Simple explanation: Imagine you write a story. Then you read it and think, "This part could be better." You rewrite it. That is reflection.

Real-life example: An AI that writes a blog post and then checks it for grammar and style.

School example: An AI that grades your essay and gives you feedback on how to improve it.

Home example: A smart assistant that suggests improvements to your schedule.

Nigerian example: An AI that helps farmers by analyzing their planting patterns and suggesting improvements.

Illustration (ASCII):

   +-------------------+
   |   REFLECTION      |
   +-------------------+
   | Agent does work   |
   | Agent reviews it  |
   | Agent improves it |
   +-------------------+

Mini summary: Reflection is when an agent looks at its own work and improves it.


Lesson 7: Agent Design Patterns โ€“ Tool Use

Tool use is when an agent uses external tools to accomplish a task. Tools can be calculators, web searches, APIs, or other software.

Definition: Tool use is when an agent uses external tools to help it achieve a goal.

Why it is important: Tool use expands what an agent can do. It is like giving the agent superpowers.

Simple explanation: Imagine you are building a house. You use a hammer, a saw, and a measuring tape. Those are your tools. Agents can use tools too.

Real-life example: An agent that uses a web search API to find information.

School example: An agent that uses a calculator to solve math problems.

Home example: An agent that uses a weather API to get the forecast.

Nigerian example: An agent that uses a farming API to get crop prices.

Illustration (ASCII):

   +-------------------+
   |   TOOL USE        |
   +-------------------+
   | Agent ---> Tool   |
   | (Calculator, API) |
   | <--- Result       |
   +-------------------+

Mini summary: Tool use is when an agent uses external tools like APIs or calculators.


Lesson 8: Agent Design Patterns โ€“ Planning

Planning is when an agent breaks down a large task into smaller steps. It creates a plan before taking action.

Definition: Planning is when an agent creates a sequence of steps to achieve a goal.

Why it is important: Planning helps agents handle complex tasks. It is like having a roadmap.

Simple explanation: Imagine you are going on a trip. You plan the route, book the hotel, and pack your bags. You do not just start driving. Agents plan too.

Real-life example: An agent that plans a vacation. It books flights, hotels, and activities.

School example: An agent that creates a study schedule for you.

Home example: An agent that plans your weekly meals.

Nigerian example: An agent that plans a farming season. It decides when to plant, water, and harvest.

Illustration (ASCII):

   +-------------------+
   |   PLANNING        |
   +-------------------+
   | Goal              |
   |  |                |
   |  v                |
   | Step 1, Step 2,   |
   | Step 3, ...       |
   +-------------------+

Mini summary: Planning is when an agent breaks a large task into smaller steps.


Lesson 9: Evaluating Agent Performance

Evaluation is how we check if an agent is doing a good job. We look at its performance, accuracy, and efficiency.

Definition: Evaluation is the process of measuring how well an agent performs.

Why it is important: Evaluation helps us improve agents. It tells us what is working and what is not.

Simple explanation: Imagine you are a coach. You watch your player and see how they are doing. You give them feedback. That is evaluation.

Real-life example: Testing a chatbot to see if it can answer 90% of questions correctly.

School example: Checking if an AI tutor helps students improve their grades.

Home example: Testing a smart thermostat to see if it saves energy.

Nigerian example: Testing a farming agent to see if it increases crop yield.

Illustration (ASCII):

   +-------------------+
   |   EVALUATION      |
   +-------------------+
   | Measure accuracy  |
   | Measure speed     |
   | Measure success   |
   +-------------------+

Mini summary: Evaluation is how we measure how well an agent performs.


Lesson 10: Building a Simple Research Agent

Now, let us build a simple research agent. It will search for information, summarize it, and write a short report.

Definition: A research agent is a tool that finds and summarizes information.

Why it is important: It saves time and helps you learn about new topics quickly.

Simple explanation: You give it a topic, it finds information, and it gives you a summary.

Real-life example: You want to learn about "renewable energy in Nigeria." The agent finds articles, reads them, and gives you a summary.

School example: You have a research project on "the water cycle." The agent finds resources and creates an outline.

Home example: You want to know "how to fix a leaky tap." The agent finds step-by-step instructions.

Nigerian example: You want to know "the best crops to plant in Kaduna." The agent finds information and makes a recommendation.

Illustration (ASCII):

   +-------------------+
   | RESEARCH AGENT    |
   +-------------------+
   | Topic: "Climate   |
   | change in Nigeria"|
   +-------------------+
   | 1. Search web     |
   | 2. Read articles  |
   | 3. Summarize      |
   | 4. Write report   |
   +-------------------+

Mini summary: A research agent finds and summarizes information. It saves you time.


Key Vocabulary

Word Simple Definition
AI Agent A program that acts autonomously to achieve a goal.
Assistive AI AI that responds to your commands.
Agentic AI AI that takes initiative on its own.
Perception How an agent senses its environment.
Reasoning How an agent thinks and makes decisions.
Action What an agent does in the world.
Reflection When an agent reviews and improves its work.
Tool Use When an agent uses external tools.
Planning Breaking a large task into smaller steps.
Evaluation Measuring how well an agent performs.

Important Concepts

  • AI Agents act autonomously to achieve goals.
  • Assistive AI responds to you. Agentic AI acts on its own.
  • Agents have three parts: Perception, Reasoning, and Action.
  • Single-agent systems have one agent. Multi-agent systems have many.
  • Reflection is when an agent improves its own work.
  • Tool use is when an agent uses external tools.
  • Planning is breaking a task into steps.
  • Evaluation measures how well an agent performs.

Step-by-step Explanations

Step-by-Step: How an Agent Works

  1. Perceive: The agent senses the environment. It might read input, see an image, or detect a signal.
  2. Think: The agent reasons about what to do. It uses AI to decide on the best action.
  3. Plan: If the task is complex, the agent breaks it into steps.
  4. Act: The agent takes action. It might send a message, make a change, or use a tool.
  5. Reflect: The agent checks its work and looks for ways to improve.

Real-life Examples

  • Example 1: A customer service agent that can answer questions and process refunds automatically.
  • Example 2: A personal finance agent that tracks your spending and suggests a budget.
  • Example 3: A travel agent that books flights, hotels, and activities for you.

Nigerian Examples

  • Example 1: An agent that helps farmers in Kaduna plan their planting season.
  • Example 2: An agent that helps students in Lagos find scholarships and apply for them.
  • Example 3: An agent that helps small businesses in Abuja track their inventory and reorder stock.

Fun Examples Children Can Relate To

  • Example 1: A game agent that plays a video game with you.
  • Example 2: A homework agent that helps you with your assignments.
  • Example 3: A storytelling agent that writes stories for you.

Everyday Examples

  • Example 1: A voice assistant that can order food for you.
  • Example 2: A smart home system that adjusts lighting and temperature.
  • Example 3: A shopping agent that finds the best prices for you.

Parent Tips

  • Tip 1: Discuss the difference between assistive and agentic AI with your child.
  • Tip 2: Encourage your child to think of tasks they would like an agent to do.
  • Tip 3: Talk about the importance of evaluating agents. It is okay to test and improve.
  • Tip 4: Help your child build a simple research agent using a no-code tool.
  • Tip 5: Discuss the ethical implications of agents acting on their own.

Interesting Facts

  • AI Agents are used in self-driving cars to make split-second decisions.
  • Multi-agent systems are used in video games to control non-player characters (NPCs).
  • Reflection is a key feature of advanced AI models like GPT-4.
  • Tool use is what makes agents powerful. They can use calculators, search engines, and APIs.

Did You Know?

  • Did you know that AI Agents can be used to create art?
  • Did you know that some agents can learn from their mistakes and improve?
  • Did you know that multi-agent systems are used in climate modeling?

Remember This

  • An AI Agent acts autonomously to achieve a goal.
  • Assistive AI responds to you. Agentic AI acts on its own.
  • Agents perceive, reason, and act.
  • Single-agent systems have one agent. Multi-agent systems have many.
  • Reflection, tool use, and planning are key design patterns.
  • Evaluation measures how well an agent performs.

Common Mistakes

  • Mistake 1: Thinking all AI is agentic.
    Correction: Many AIs are assistive, not agentic.
  • Mistake 2: Building a single agent for a task that needs a team.
    Correction: Use multi-agent systems for complex tasks.
  • Mistake 3: Not evaluating the agent.
    Correction: Always test and measure performance.
  • Mistake 4: Giving the agent too much freedom.
    Correction: Set boundaries and guidelines.

Best Practices

  • Start with a clear goal for your agent.
  • Use the right type of agent for the task (single or multi).
  • Incorporate reflection to improve agent performance.
  • Use tools to extend agent capabilities.
  • Plan tasks by breaking them into steps.
  • Evaluate your agent regularly.

ASCII Illustrations, Diagrams, Flowcharts, Timelines, Tables

Diagram: Agent Architecture

   +--------+     +--------+     +--------+
   |PERCEIVE|---->| REASON |---->|  ACT   |
   | (Sense)|     | (Think)|     | (Do)   |
   +--------+     +--------+     +--------+

Flowchart: Agent Decision Process

   +-------------------+
   |  Perceive         |
   +-------------------+
          |
          v
   +-------------------+
   |  Reason           |
   |  (What to do?)    |
   +-------------------+
          |
          v
   +-------------------+
   |  Plan             |
   |  (How to do it?)  |
   +-------------------+
          |
          v
   +-------------------+
   |  Act              |
   |  (Do it)          |
   +-------------------+
          |
          v
   +-------------------+
   |  Reflect          |
   |  (Did it work?)   |
   +-------------------+

Comparison Table: Assistive AI vs Agentic AI

Feature Assistive AI Agentic AI
Initiative Responds to commands Takes initiative
Autonomy Low High
Complexity Simple Complex
Example Voice assistant Self-driving car


End-of-Module Summary

Congratulations! You have completed Module 4 of "AI and Automation Level Two." Let us review what we covered.

  • We learned what an AI Agent is โ€“ a program that acts autonomously to achieve a goal.
  • We learned the difference between Assistive AI and Agentic AI.
  • We learned about the architecture of an agent: Perception, Reasoning, and Action.
  • We learned about single-agent and multi-agent systems.
  • We learned about agent design patterns: Reflection, Tool Use, and Planning.
  • We learned how to evaluate agent performance.
  • We built a simple research agent.

You are now ready for Module 5. In the next module, we will dive into Retrieval-Augmented Generation (RAG). We will learn how to give agents access to knowledge and data. Get ready for some exciting challenges!


Frequently Asked Questions

  1. Q: What is an AI Agent?
    A: A program that acts autonomously to achieve a goal.
  2. Q: What is the difference between assistive and agentic AI?
    A: Assistive AI responds to you. Agentic AI acts on its own.
  3. Q: What are the three parts of an agent?
    A: Perception, Reasoning, and Action.
  4. Q: What is a single-agent system?
    A: One agent working on its own.
  5. Q: What is a multi-agent system?
    A: Multiple agents working together as a team.
  6. Q: What is reflection in an agent?
    A: When an agent reviews and improves its own work.
  7. Q: What is tool use in an agent?
    A: When an agent uses external tools like APIs.
  8. Q: What is planning in an agent?
    A: Breaking a large task into smaller steps.
  9. Q: Why is evaluation important?
    A: It helps us measure and improve agent performance.
  10. Q: Can I build my own agent?
    A: Yes! You can start with a simple research agent using no-code tools.

Matching Exercises

Match the word on the left with its correct definition on the right.

Word Definition
1. Agent A. Sensing the environment.
2. Perception B. Acts autonomously to achieve a goal.
3. Reasoning C. Using external tools.
4. Tool Use D. Thinking and making decisions.
5. Reflection E. Reviewing and improving work.

Answers: 1-B, 2-A, 3-D, 4-C, 5-E


Scenario-based Exercises

  1. Scenario 1: You want to build an agent that helps you plan a birthday party. What would the agent do? What tools would it need?
  2. Scenario 2: You want to build an agent that helps you study for exams. What would the agent do? How would it perceive, reason, and act?
  3. Scenario 3: You want to build a multi-agent system for a farm. What would each agent do? How would they work together?
  4. Scenario 4: You want to build an agent that helps you manage your finances. What would the agent do? How would it use tools?

Group Activity

Activity: In groups of 3-4, design a multi-agent system for a task of your choice. Each agent should have a specific role. Draw a diagram showing how they work together. Present your design to the class.


Individual Activity

Activity: Build a simple research agent using a no-code tool. Choose a topic and have the agent research it. Write a report on what the agent found and how well it performed.


Mini Project

Project: Build a simple AI agent that can answer questions about a topic you are interested in. Use a no-code tool to build it. Test it and evaluate its performance.


Practical Assignment

Assignment: Research a real-world application of AI Agents. Write a report on what the agent does, how it works, and what impact it has.


Key Takeaways

  • An AI Agent acts autonomously to achieve a goal.
  • Assistive AI responds to you. Agentic AI acts on its own.
  • Agents perceive, reason, and act.
  • Single-agent systems have one agent. Multi-agent systems have many.
  • Reflection, tool use, and planning are key design patterns.
  • Evaluation measures how well an agent performs.

Classroom Discussion Questions

  1. What is the most exciting use of AI Agents you can imagine?
  2. What are some risks of using AI Agents?
  3. How can we make sure AI Agents are used ethically?
  4. What tasks would you not want an agent to do? Why?
  5. How do you think AI Agents will change the world in 10 years?

Preparation for the Next Module

In Module 5, we will dive into Retrieval-Augmented Generation (RAG). We will learn how to give agents access to knowledge and data. To prepare, think about a topic you would like an agent to have knowledge about. It could be history, science, or even local knowledge.

See you in Module 5!


Note: This is the end of Module 4. You are now ready for Module 5, where we will dive into RAG. Keep your curiosity alive!

๐Ÿ† Get Certified

๐Ÿ”’

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (โ‚ฆ2,000 or 20,000 coins), and get a verified certificate with your name on it.

๐ŸŽ“ Sign Up to Get Certified
๐Ÿ› ๏ธ Practice Tools
Hands-on simulators & labs - subscription required.
โ†’
๐ŸŽฏ Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
โ†’