Wiki
Intro9 min read

From model to agent

A chat model answers; an agent acts. The four parts that turn next-token prediction into a system that can change the world.

A chat model is a function: text in, text out. Ask it for the weather and it can only describe what a weather API would say. An agent is the same model wrapped in a loop that lets it call the weather API, read the result, and decide what to do next. Nothing about the model changed — what changed is that its output can now have consequences.

Start here

An agent is a model plus three things it doesn't have on its own: a set of tools it can call, a loop that runs until the goal is met, and state that persists across steps. The model still predicts the next token; the loop is what makes that token an action.

The LLM domain's Agents and tools lesson is the ten-minute overview of this idea. This domain is the deep version — we will build up the loop, tools, memory, planning, and the guardrails that make acting autonomously safe.

The loop in one picture

Agent loop — user: "What's a 15% tip on $84.50?"

step 0/7
press "next step" to watch the loop

ReAct pattern: reason → act → observe → repeat. Illustrative trace; real agents choose tools the same way — by reading tool descriptions in the prompt and emitting structured calls.

A single turn — the model reasons, emits a tool call, the runtime runs it, the result comes back — is called a step. The agent repeats steps until it decides it is done. That repetition is the whole difference between a model that knows things and a system that does things.

The four parts

  • The model — the reasoner. Usually an LLM, but it can be smaller, faster, or specialised (a decision model for routing, say). Its job is to choose the next action given the state.
  • The tools — the hands. Anything with a typed interface: a calculator, a database query, a file write, an HTTP call, another model. A tool the model cannot call does not exist to it.
  • The loop — the control flow. Reason, act, observe, repeat. It ends on success, on a step or cost budget, or when the model gives up.
  • The state — the memory. At minimum the growing transcript of what has happened; often a scratchpad, a plan, or a store that outlives the context window.

The word is overloaded

"Agent" is used loosely, and the honest thing is to say so. The useful distinction is a spectrum of autonomy:

  • a prompt chain runs a fixed sequence of calls — no model decisions about what comes next;
  • a router lets the model pick which fixed path to take;
  • an agent lets the model decide, step by step, how many steps to take and what each one is.

Careful

Most things marketed as agents are workflows: fixed graphs with a model inside a box or two. That is not a criticism — a workflow is usually the right answer (the last lesson in this chapter is about exactly this). But calling a pipeline an "agent" sets wrong expectations about cost, reliability, and what it can handle.

Check yourself

Eduspheria wiki · Agentic AI, Foundations

0 / 4 answered

  1. 1In the four-part picture of an agent, which part is 'the hands' — anything with a typed interface the model can call?
    Multiple choice
  2. 2Wrapping a model in an agent loop changes what the underlying model predicts.
    True / false
  3. 3What is a fixed sequence of model calls with no model decision about what comes next?
    Short answer
  4. 4Which point on the autonomy spectrum lets the model decide, step by step, how many steps to take and what each one is?
    Multiple choice

Next: the loop itself — reason, act, observe, and when to stop.