The Agent Family

Part of the free Generative AI course on LogicWiz, module: The Agent Awakens.

Episode 13: The Agent Family

"Nova is a very modern agent. But to design agents well, you have to know the whole family — starting with a robot that can't stop bumping into walls."


Rewinding to First Principles

Nova is an LLM agent — reasoning, calling tools, looping. Impressive. But "agent" is an old idea in AI, and there's a whole family tree beneath her. Knowing it makes you a far sharper designer, because every one of Nova's behaviours — reacting, remembering, planning, choosing — is one branch of that tree.

And you already live with these agents. Your thermostat, a Roomba, Google Maps, the "best flights" sort on a travel site — each is a different member of the family. We'll meet them from simplest to smartest.

The simplest one does exactly one thing: it perceives the world and reacts. No memory, no plan, no weighing of options. Just "if I see this, I do that." Meet the humblest agent of all — a robot vacuum in a two-room apartment.


The Simple Reflex Agent

A simple reflex agent follows pure condition → action rules. It looks at the current state and reacts immediately, thinking nothing about the past or the future:

  • If the room is dirty → suck.
  • If the room is clean → move to the other room.

That's the entire brain — and it's more common than you'd think. A thermostat ("if it's below 20°C, turn on the heat"), an automatic door ("if motion, open"), a smoke alarm ("if smoke, beep") are all simple reflex agents. Pure stimulus, immediate response, zero memory.

Watch our vacuum run — Room A starts dirty, Room B starts clean. Its entire brain is that one rule: look at the current tile, suck if dirty, otherwise move. One percept in, one action out:

{{visual:vacuum-world}}

It works! …until it doesn't. Because the agent has no memory, it can't remember that it already cleaned a room. Drop it into an apartment where both rooms are already clean and it will pace between them forever — clean, move, clean, move — burning battery on a job that's already done. It's like someone re-mopping a spotless floor because they genuinely can't recall doing it a minute ago. Reacting is cheap, but reacting blindly is a trap.

⚠️ Warning: A simple reflex agent only ever sees the immediate percept. With no history, it can loop endlessly, repeating actions that accomplish nothing. Memory is the fix.


The Model-Based Reflex Agent

Give the agent a little memory — an internal model of the world — and everything changes. A model-based reflex agent keeps a running picture of what it has seen: which rooms are clean, which are dirty, which are still unknown.

This is the jump from a dumb bump-and-turn vacuum to a modern one that maps your home and remembers where it has already been. Now it can reason about state it can't currently see. If its internal model says both rooms are clean, it doesn't wander — it declares "job done" and stops.

The difference is night and day, and it's entirely about memory — run both agents side by side and watch one stop while the other paces on:

{{visual:reflex-vs-model}}

The simple reflex agent is cheaper to build but wastes energy oscillating. The model-based agent spends a little memory to buy a lot of efficiency — it knows when to stop. (In the real world you'd add a timer to reset the model after a few hours, so it cleans again tomorrow.)

💡 Tip: This is the exact upgrade we gave Nova two episodes ago. Short-term memory isn't a fancy add-on — even a two-room vacuum needs it to avoid doing the same thing forever.


The Goal-Based Agent

Memory stops wasted motion. But reflex agents, even with memory, are still fundamentally reactive — they respond to the state in front of them. The next leap is planning.

A goal-based agent starts from a goal — a target state it wants to reach — and works out a whole sequence of actions to get there before it moves a muscle. This is your car's GPS: you type a destination, and it plans the entire route before you pull out of the driveway, rather than deciding turn-by-turn at each intersection.

Picture a robot on a grid that needs to travel from the top-left to a goal square:

{{visual:grid-planner}}

Its loop is Perceive → Formulate Goal → Plan → Act. It compares its current position to the goal, lays out the entire up/down/left/right sequence, and only then starts moving. Because it plans the full path first, it never wanders down a dead end mid-task. Planning upfront is what separates a goal-seeker from a reactor — and it's why a chess engine, which plans moves toward checkmate, plays so differently from a piece that just reacts to whatever's next to it.

📌 Summary so far: Reflex agents react to the current percept. Model-based reflex agents add memory to avoid redundant actions. Goal-based agents add planning — they map out a full sequence of steps to reach a target before acting.


The Utility-Based Agent

A goal-based agent finds a way to the goal. But there's almost always more than one way — and they're not equally good. A utility-based agent asks a sharper question: not "can I reach the goal?" but "which path is best?"

You've made this exact choice on Google Maps. It offers three routes to the same place — one fastest, one avoiding tolls, one shortest — and you pick based on what you care about today. Swap "student vs rushed executive" for "saving money vs saving time" and it's the same idea: identical options, different priorities, different winner.

The agent scores each option with a utility function — a single number, a kind of "happiness score" — computed from the route's attributes and a set of weights that encode the user's priorities:

{{visual:utility-scorer}}

  • Positive weights reward things you want more of (safety, scenery).
  • Negative weights penalise things you want less of (time, cost).

Change the weights and the "best" route changes — the same agent becomes a different personality. Drag the priorities in the visual above and watch a rushed executive and a budget-conscious student pick completely different routes from the same three options.

The "rational" choice isn't absolute — it's relative to the priorities you encode. That single idea, utility, is how an agent turns messy human preferences into a decision it can actually make. (It's also how a travel site's "Best" flight sort works — a weighted blend of price, duration, and number of stops.)


The Whole Family — and Where Nova Fits

Four agents, each one adding a capability the last one lacked. Don't just read the tree — climb it. Start with a bare reflex agent and stack on memory, then planning, then utility, one rung at a time:

{{visual:agent-family-tree}}

So where does Nova sit? She's the modern descendant of the whole line. Her LLM brain plans (goal-based) and weighs options (utility-based); her memory gives her a world model; and at the lowest level, a tool call is still just condition → action. Every branch of the family tree lives inside her.

💡 Tip: When you design an agent, ask which family member the task actually needs. A thermostat is a reflex agent — don't bolt an LLM onto it. Reach for planning and utility only when the problem genuinely calls for them.


Chapter IV Complete — What Nova Becomes Next

Look how far Nova has come. She started this chapter as a wall of if statements. Now she's a full agent: she speaks to real models, follows precise prompts, uses tools, remembers, reasons in a loop, and you understand the entire family of agents she descends from.

In Chapter V, Nova goes professional. You'll stop hand-wiring every call and pick up the industry's power tools — frameworks like LangChain and LangGraph that turn dozens of lines of orchestration into a handful. Nova is about to graduate from a hand-built prototype into production-grade software.