Intermediate
40 mins
Teacher/Student led
+80 XP

AI Agents, Software That Plans and Acts

Learn the difference between chatbots that answer questions and AI agents that plan and act in loops to reach goals. Direct an agent through a coding task and then switch roles to act as the agent yourself.

Teacher Class Feed

Load previous activity

    1 - Start ~4 mins

    Illustration for StartYou have already trained a model and used it inside a program. Today the question is different: what happens when software is given a goal and allowed to plan, use tools, and act in a loop until the job is done?

    That kind of software is called an AI agent. You will direct one on the board, then take turns being the agent yourselves.

    2 - Agent or Chatbot? ~4 mins

    How an AI agent works

    A chatbot answers. You ask a question, it replies with text. The conversation stops until you type again.

    An AI agent is a model given a goal. It can:

    • Plan the steps needed to reach the goal
    • Act by using tools (write a file, run code, search, send a message)
    • Observe what happened (an error message, a result, a web page)
    • Adjust the plan and try the next step

    It keeps looping through plan, act, observe, adjust until the goal is met or it is stopped. A chatbot waits; an agent keeps going.

    3 - Hands-on: Direct the Agent ~14 mins

    Your class is about to direct an AI coding agent. One person is the error-spotter: their job is to call out when something looks wrong. Everyone else confirms the goal, predicts the next step before it happens, and names which phase is running: plan, act, observe, or adjust.

    Goal: write a short program that asks for two numbers and prints their sum. If anything breaks, fix it.

    Your teacher will run a live agent on the board, or walk a worked transcript one beat at a time. Before each reveal, write or say: next phase = ? next action = ?

    After the run, answer as a class:

    • Which steps were plan, act, observe, adjust?
    • Where did the agent need a human watching it?
    • How is this different from a chatbot that only explains how to add two numbers?
    • Observe and adjust is debugging: the agent runs a test, reads what went wrong, and fixes it. Where did you see that today?
    Exploration

      4 - Hands-on: Be the Agent ~12 mins

      Now you take the roles yourselves. Your teacher will model one tiny loop with the whole class first, then you work in pairs.

      Director: state the goal. After each full loop, decide whether another loop may start, or stop the agent. You do not plan or do the work.

      Agent: do only one full loop at a time:

      1. Plan one step out loud
      2. Act it on paper or on screen
      3. Report what you observed
      4. Say how you will adjust

      Then wait for the director before the next loop.

      Remember: Director speaks only after Adjust. Agent does one step, then waits.

      Pick one goal from the list your teacher shows on the board. Run two full loops in total: complete at least one loop, swap once so each of you is the agent for at least one loop, then stop.

      5 - Make Sense ~3 mins

      An AI agent is not just a chatbot with a longer answer. It is software given a goal that can plan, use tools, act, read what happened, and try again in a loop.

      In coding, that loop is familiar: write, run, read the error, fix. Observe and adjust is debugging: the agent runs a test, reads what went wrong, and fixes it. The difference is who is driving each step, and who is still responsible for the result. You saw both sides today: directing an agent, and being one under strict rules.

      123learn · Online learning platform

      Unlock the full learning experience

      You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

      Hundreds of curriculum-aligned lessons
      Interactive activities in every lesson
      Printable resources & progress tracking
      Copyright Notice
      This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
      🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more