Stage 3 · Teens · Agents

What Is an Agent?

The observe-think-act loop that turns a model into an agent.

An agent is an LLM wrapped in a loop that lets it take multiple steps toward a goal, using tools and observing results along the way — rather than producing one single response.

Instead of "answer this question in one shot," an agent can: look something up, notice it needs more information, look up something else, then finally respond. The loop keeps running until the model decides it has enough information to give a final answer, or a limit (steps, time, cost) is reached.

The Agent Loop
Observe
read state / input
Think
reason / plan
Act
call a tool
The agent gathers context: user request, tool results, environment state.

Worked example. Say a user asks: "Book me a flight to the cheapest destination this weekend."

A single LLM call has no way to actually find out prices — it can only generate text from what it already knows. It will do one of two things: guess a plausible-sounding destination and price (which may be wrong or outdated), or refuse/hedge: "I don't have access to real-time flight prices, please check a travel site." Either way, nothing gets booked, and the user still has to do the work.

An agent given search and booking tools instead loops: it lists a handful of candidate weekend destinations, calls a flight-search tool for each one, observes the actual returned prices, compares them, picks the cheapest, and only then calls a booking tool to complete the purchase — checking in with the user for confirmation if the harness requires it before spending money. The ambiguity in "cheapest" gets resolved by actually looking, not by guessing.

💡

The loop is what turns "I don't know, but here's a guess" into "let me find out" — the model trades a single leap of inference for several small, checkable steps.

Check your understanding
1. What fundamentally distinguishes an "agent" from a single LLM call?
2. For "book me a flight to the cheapest destination this weekend," why can't a single LLM call reliably do this correctly?
All lessons in Stage 3: Agents and safety