The agent mental model
A chatbot answers what you type into it. An agent can look at your files, run commands, and keep working through several steps toward a goal before reporting back. This page builds the vocabulary you will use for the rest of the course.
The intellectual evolution from chat to agent
Let us briefly review the history of how LLM technology evolved over time.
LLMs begin as “text generators”
Remember that early modern LLM use was essentially:
Prompt → LLM → Response
The model could explain, summarize, draft, and answer questions, but it could not independently interact with the outside world.
Reasoning improves
Researchers found that models often performed better on complex problems when they decomposed the problem into intermediate reasoning steps. Conceptually:
Question → Think → Think → Answer
But reasoning alone has a limitation: the model is still reasoning only from what it already knows. It cannot check a database, search the web, send an email, or inspect a live system.
Give the LLM tools
The next important idea was to let the model call external functions:
LLM → search()
LLM → calculator()
LLM → database()
Now the model can act on the world, or at least retrieve information from it. But this raises a new question: How does the model decide when to think versus when to use a tool?
ReAct: Reason + Act
In 2022, researchers from Princeton University and Google Research provided a very influential answer: interleave reasoning and actions rather than treating them separately. The basic loop looks like (ReAct):
Reason → Act → Observe → Reason → Act → Observe → … → Answer
For example, suppose the goal is to find the cheapest flight that satisfies a set of travel constraints:
Goal: Find the cheapest flight that satisfies my travel constraints.
Reason: I need to know the dates and available flights.
Act: Search flights.
Observe: Here are the available flights.
Reason: Two options satisfy the constraints; I should compare baggage fees.
Act: Look up baggage policies.
Observe: Airline A charges $70.
Reason: Airline B is cheaper overall.
Answer: Recommend Airline B.
The important innovation is the feedback loop. An action produces new information, and the model uses that information to decide what to do next.
ReAct becomes the basic architecture of an agent
Once you have this loop, you are very close to what we now call an agent:
Goal
↓
LLM decides next action
↓
Use tool
↓
Observe result
↓
Decide what to do next
↓
repeat until goal is achieved
Modern agent systems add things around this basic loop—more sophisticated planning, memory, permissions, guardrails, multiple tools, and sometimes multiple agents. OpenAI describes agents as systems in which a model operates with instructions, tools, and guardrails to execute workflows.
The diagram below lays out the evolution:
A comparison of chat versus agent
Compressed into one comparison, the shift looks like this:
| Chat | Agent | |
|---|---|---|
| You provide | A question or task | A goal |
| AI mainly does | Responds | Acts |
| Who determines the next step? | Usually the human | Often the AI |
| Tool use | Usually at your direction | Can choose and sequence tools itself |
| Duration | Usually one interaction | Can involve multiple steps |
| Human role | Direct each step | Set goals, constraints, and oversight |
Exercise: Chat or agent?
For each task below, decide whether it describes a plain chat interaction or an agent interaction.
| Task | Chat or agent? |
|---|---|
| You paste three paragraphs and ask for a shorter version. | |
| You ask it to open every invoice PDF in a folder and total the amounts. | |
| You ask it to explain what a P/E ratio means. | |
| You ask it to find and fix a broken formula in a spreadsheet, then confirm the fix by recalculating. |
Check your work: rows 1 and 3 need nothing beyond the text in the message, so plain chat is enough. Rows 2 and 4 require opening files and verifying a result against them — that requires an agent.
Once you can tell the two apart, the more useful question is what changes about your own job once an agent is doing the acting. The next page takes that up.