Agents Follow Steps
Have you ever played a board game where you move one space at a time toward the finish line? You cannot jump straight to the end. You have to take it one step at a time — roll the dice, move your piece, see where you land, then do it again next turn. AI agents work the same way. They do not teleport from start to goal in one leap. They reach their goal one step at a time, over and over, in a repeating loop. That loop is the engine that powers every AI agent on the planet.
The Sense-Decide-Act Loop
Every step an agent takes follows the same three-part pattern. Step 1 — Sense: The agent gathers information about the world right now. Where am I? What is in front of me? What time is it? What changed since my last step? Step 2 — Decide: The agent uses that information to pick what to do next. Should I go left? Should I send an alert? Should I wait? Step 3 — Act: The agent does the thing it decided. It moves, sends, sorts, or makes a sound. Then it goes back to Step 1 and starts sensing again. The loop repeats — over and over — until the goal is reached.
Every AI agent runs a loop: sense, decide, act — then sense again, decide again, act again. Each loop is one small step toward the goal. Millions of small steps add up to completing the whole job!
Let us trace the loop for a robot vacuum cleaning a bedroom. Loop 1: Sense — the robot is near the left wall. Decide — go right along the wall. Act — roll forward one meter. Loop 2: Sense — there is a chair leg ahead. Decide — turn right to avoid it. Act — turn 90 degrees. Loop 3: Sense — path is clear. Decide — go straight. Act — roll forward. Loop 4: Sense — battery is at 10%. Decide — return to dock immediately. Act — navigate back to the charging station. Each loop is tiny. But loop after loop after loop, the robot covers the whole floor and completes its goal. The repeating loop is everything.
Flashcards — click each card to reveal the answer
Humans run their own versions of this loop all the time without thinking about it. Imagine dribbling a basketball toward the hoop. Each moment you sense where the ball is and where the defenders are. You decide to go left. You act and take a step. Then you sense again — a defender stepped in front! You decide to pass. You act and throw the ball to a teammate. You ran through many loops in just a few seconds. An AI agent does the same thing, just with sensors and computer code instead of eyes and muscles.
A robot vacuum might run its sense-decide-act loop dozens of times per second. A self-driving car runs it hundreds of times per second! The faster the loop runs, the more quickly the agent can respond to changes in the world.
A robot vacuum senses a chair leg, decides to turn, and turns right. Then it senses an open path and decides to go forward. What is the robot doing?
Why does an AI agent need to sense the world again after each action?
Be the Agent: Human Loop Challenge
- You are going to act out the sense-decide-act loop yourself!
- Set a simple goal: move from one end of a room to the other without touching any objects on the floor.
- Have someone place five objects (shoes, books, pillows) randomly in your path.
- Now walk slowly. At each moment, say out loud:
- SENSE: what do I see in front of me?
- DECIDE: should I go left, right, step over, or go straight?
- ACT: take one step.
- Repeat until you reach the other side.
- Count how many loops it took. Talk about it: how is your walk like an AI agent moving toward a goal?