Lesson 8 of 8
What an AI agent is
9 min read
Last lesson, AI got hands — it could finally use your tools. But it still waited for you to spell out every move. What if you could just hand it a goal and let it work out the steps itself?
An assistant answers; an agent acts
An ordinary assistant works in one shot: you ask, it replies, done. An agent is different — you hand it a goal, not step-by-step instructions, and it works toward that goal on its own. Instead of a single answer it takes a series of actions: it figures out a next step, does it, looks at what happened, and decides what to do next — over and over, until the goal is met. Same underlying model as the assistant; what's new is that it runs in a loop instead of stopping after one reply.
An agent is an AI you give a goal rather than instructions. It doesn't answer in one shot — it works in a loop, taking action after action until the goal is reached.
Think → act → observe, on repeat
Each pass through the loop has the same three moves. Think: decide the next step. Act: do it — usually by using a tool, the same tool use from the last lesson. Observe: look at the result. Then it loops back and thinks again. The magic is in that last move: the agent reacts to what it sees. If a table at 7pm is full, it notices and tries 8pm. It isn't following a fixed script — it's adjusting as it goes.
The loop is think → act → observe, repeated. Acting usually means using a tool; the key is that the agent observes each result and lets it shape the next step, rather than running a fixed script.
Reacting — and knowing when to stop
Now change the world on it. Make the 7pm table full and run the loop again: at the observe step it notices, and its very next think switches to trying 8pm. Nobody wrote 'if 7pm is full, try 8pm' — it reacted. That flexibility is the whole point, and also where an agent can go wrong: a bad observation can send it down a bad path, and each new step builds on the last.
So flip on the guardrail. Now, just before the one move that's hard to undo — actually booking — the agent stops and waits for your OK. This is the human in the loop: let the agent race through the cheap, reversible steps on its own, but pause it at the expensive, irreversible ones. Well-designed agents draw that line for you before they ever send money, delete files, or hit 'confirm'.
An agent reacts to what it observes, which makes it powerful and a little risky. The safety move is a human in the loop: let it act freely on small, reversible steps, but require a person's OK before big, hard-to-undo ones.
This freedom is also where it can go wrong: an agent acting on its own can take a bad step and then build on it. That's why well-designed agents check in with you — or pause for confirmation — before big, hard-to-undo actions like sending money or deleting files.
The AI at the center
Put the pieces together and a familiar shape appears, almost like a tiny computer. The AI is the brain in the middle, deciding what to do. Tools are its hands, reaching out to the world (lesson seven). And the conversation on its desk — the context window from lesson five — is its working memory, holding the goal and everything it has learned so far. The loop is what makes that brain run instead of answering just once.
An agent is the AI as the brain at the center: tools are its hands, the context window is its working memory, and the think → act → observe loop is what keeps it going until the goal is done.
Recap
- —An assistant answers in one shot; an agent is given a goal and works toward it on its own
- —It runs a think → act → observe loop, using tools and reacting to each result to choose the next step
- —The AI is the brain, tools are its hands, the context window is its memory — and a human stays in the loop for big, irreversible steps
You give an AI the goal "find the cheapest flight next month and book it," and it works through several steps on its own — searching, comparing, then booking. What makes this an agent?
Continue in the app
Take the whole AI from Scratch course — tracked
Get your personalized path, progress and streaks in the app — this lesson and every next one, in order.