Skip to main content
AI Agents & Automation

⏱ About 10 min10 XP

The Loop Keeps Going

Imagine you are tidying your room. You pick up a sock and put it in the hamper. You look around. You see a book on the floor. You pick it up and put it on the shelf. You look around again. You see some pencils scattered on the desk. You gather them and put them in the cup. You look around one more time — the room looks clean! You ran a loop the whole time: look around (sense), decide what to pick up next (think), pick it up and put it away (act), look around again (sense), and so on. You kept looping until the job was done. That is exactly how AI agents work. The loop never stops until the goal is achieved — or until the agent is turned off.

Module Vocabulary Review

Before we put the whole picture together, let us make sure all the important words from this module are solid in your mind. You have learned a lot of new vocabulary — these are the words that let you talk about agents like a scientist would.

Flashcards — click each card to reveal the answer

The Full Picture: A Loop That Never Quits

Here is the whole story of the sense-think-act loop, from beginning to end. An agent is given a goal. Maybe it is 'keep this room at 70 degrees.' Maybe it is 'deliver this package to the third floor.' Maybe it is 'answer questions from customers between 9 AM and 5 PM.' The agent starts its loop. Sense: what is happening right now? Think: what is the best next action? Act: do it. Then immediately: Sense again — did it work? Is the goal closer? If the goal is not done, the loop runs again. Sense. Think. Act. Check. Sense again. The loop keeps running until the goal is achieved. Sometimes a goal takes three loops. Sometimes it takes three million loops. The agent does not get bored or tired. It just keeps looping.

The Loop Is the Secret

Every AI agent — from the smallest smart thermostat to the most advanced self-driving car — works because of the sense-think-act loop. Sense, think, act. Over and over. That loop is the heartbeat of all agents, everywhere.

Match each moment in an agent's loop to the correct step name.

Terms

The agent's microphone picks up the words 'play my favorite song'
The agent decides to search its playlist for the top-played song
The agent starts playing the song through the speaker
The agent listens to hear if the music is actually playing

Definitions

Think: choosing what to do with the information
Act: doing the chosen action in the world
Check: sensing the result to see if the action worked
Sense: gathering information from the world

Drag terms onto their definitions, or click a term then click a definition to match.

Different kinds of agents run their loops at very different speeds. A thermostat might check the temperature once every few minutes — its loop is slow because temperature does not change fast. A self-driving car checks its sensors thousands of times every second — its loop is blazing fast because the world around it changes in an instant. A customer service agent might take a few seconds to read a message, think of a reply, and send it — a medium-speed loop. But whether the loop is slow, medium, or fast, it is always the same three steps: sense, think, act.

Complete each sentence with the right word.

An agent the world, about what to do, and then — and keeps looping until the job is done.
You Finished the Module!

You have traveled through the full world of agent sensing and acting. You know what sensors are, how they turn the world into numbers, how agents decide what to do, what physical and digital actions look like, how agents check their results, how they try again when things fail, and how the loop keeps repeating until the job is done. You think like an agent engineer now!

A robot cleaner finishes vacuuming one room and senses that the next room still has crumbs. What does it do?

A self-driving car checks its sensors thousands of times every second. A thermostat checks once every few minutes. What do they have in common?

What is the sense-think-act loop?

Design Your Own Agent

  1. You are going to design a complete AI agent from scratch and explain its sense-think-act loop.
  2. Choose a goal for your agent. It can be anything: tidying a bedroom, watering plants, helping sort recycling, answering questions at a library, or any job you can imagine.
  3. On paper, fill in this Agent Design Sheet:
  4. My agent's name and job:
  5. Sensor(s) my agent uses and what each one notices:
  6. What does my agent SENSE at the start of a loop?
  7. What does my agent THINK and decide?
  8. What ACTION does my agent take?
  9. How does my agent CHECK if the action worked?
  10. What does my agent do if the action did not work?
  11. When does the loop end?
  12. Draw a picture of your agent if you like.
  13. Share your design with someone and walk them through one complete loop — sense, think, act, check. Talk about: what makes your agent smart, and what might make it struggle?