Skip to content

Module 4 of How AI works. About 15 minutes.

Agents

An agent is a model that can use tools: look up a record, run a calculation, place an order. The model still only writes text. What it can actually do is decided by the software around it.

An agent is not a different kind of model. It is a language model inside a harness: the software that gives it tools, runs them, and decides what it is allowed to do. This module shows the loop that makes an agent work, then what changes when the harness changes.

The tool loop

Step through an agent answering "Bella is vomiting. What maropitant dose should she get, and do we have it in stock?" Watch the context window: the text the model sees on every call.

The model writes a tool call as text. The harness runs the tool and adds the result to the context. Then the model is called again and predicts again over everything so far, until it writes a final answer. Count the model calls: every round is a new prediction over the whole context.

A scripted trace: the steps are fixed, and no model is called. Bella and her dose are illustrative.

Same model, different harness

The task is to order maropitant for Bella and add it to her treatment plan. Switch tools, write access and human approval on and off, and run the same task each time.

With no tools, the model can only write a reply. With read-only access, it can look things up but not act. With approval on, every write waits for a clinician. With approval off, writes go straight through, and so would any bad data in the record. The model is the same every time. Safety lives in the harness.

A scripted trace with four fixed outcomes, and no model is called. Bella's case is illustrative.

What to take away

When a tool says it can act for you, ask what its harness allows it to do, and who approves each action. That question tells you more about the risk than the name of the model inside.

Where next

How AI works: Module 5: Images

A shared question channel is on the way. When it opens, each answer will be written once and shared with everyone taking the course.