Studio Matrx Monthly · Volume 1 · Issue 4 · September 2026
Amogh N P
 In loving memory of Amogh N P — Architect · Designer · Visionary 
How LLMs Became AgentsLesson 1.1
AI Agents & Autonomous Design Systems/Module 1 · Understanding AI Agents

Lesson 1.1 · Understanding AI Agents

How LLMs Became Agents

A large language model on its own only predicts the next word; it becomes an agent when you wrap it in a loop that lets it use tools and remember - and knowing which part does what is the difference between using agents well and being mystified by them

12 min Interactive lessonFree · open lessonByAmogh N P· Architect & interior designer
The hook

The model just predicts the next word. Everything that makes it feel like an agent - acting, remembering, working through a task - is code wrapped around it.

It is tempting to imagine an AI agent as a single clever mind that decides to search the web, opens your files, thinks for a while and hands back finished work. That picture is wrong in a way that matters, because it hides the seam you most need to see. At the centre of every agent is a large language model - a system trained to do one narrow thing extraordinarily well: given some text, predict what text should come next. That is genuinely all the model does. It does not, by itself, remember your last conversation, browse the internet, run software or take any action in the world. Left alone it is a brilliant, stateless text-completer that produces a paragraph and then stops.

An agent is what you get when you wrap that model in a layer of ordinary computer code - a loop, a set of tools, and a way to carry information forward - that lets the model's text output actually cause things to happen, feeds the results back in, and runs the whole cycle again until the job is done. This code is usually called the scaffolding, the harness or the orchestration layer, and it is unglamorous, deterministic software, not magic. Understanding the join between the model (which reasons in text) and the scaffolding (which acts and remembers) is the single most useful mental model in this whole course: it tells you where an agent's intelligence comes from, where its reliability comes from, why it fails in the particular ways it does, and how to direct and verify it as a professional rather than treating it as an oracle.

Model = text predictor. Scaffolding = tools + memory + loop. Agent = both, looping. You = judgement.

The model underneath: a very good next-word predictor

Strip an agent back to its core and you find a large language model whose entire trained skill is predicting the next chunk of text - the next token, roughly a word or word-fragment - given everything it has been shown so far. You hand it a stretch of text; it returns the most plausible continuation, one token at a time, each new token appended and fed back in to predict the next. From this single mechanism, trained on an enormous corpus, comes the fluent, apparently knowledgeable, often genuinely reasoned text these models produce. It is astonishing what next-token prediction can do - but it is worth being precise about what it is, because the limits follow directly from it.

Three properties of the raw model shape everything an agent does. First, it is stateless: the model has no memory of its own between calls. Everything it 'knows' about your task in this moment is the text you put in front of it right now - the conversation so far, the instructions, whatever context you supplied. Close the window and the model retains nothing; it did not 'learn' your project. Second, it only emits text. It cannot, on its own, open a file, run a calculation, query a database or click a button - it can only produce words describing what it would do. Third, it is fluent whether or not it is right: because it is optimised to produce plausible-sounding text, it will confidently continue a sentence with an invented code clause or a wrong dimension exactly as readily as with a correct one. This is the root of what people call hallucination, and it never fully goes away.

Hold onto this picture, because it explains the division of labour to come. The model is where language and reasoning live - it is the part that can read a messy brief, weigh options, draft a specification, or work out what to do next. But it cannot act, cannot remember on its own, and cannot be trusted to be correct without checking. Every one of those gaps is filled not by a smarter model but by the code wrapped around it. The model is the engine; on its own it is a very powerful engine sitting on a bench, running but connected to nothing.

MODEL IN THE MIDDLE, SCAFFOLDING AROUND ITSCAFFOLDING - ordinary deterministic code (you shape this)tools + actionsmemory + contextthe looplimits + checkpointsMODEL (LLM)predicts next tokenstateless - cannot act aloneCapability rides on the model; reliability and control ride on the scaffolding.
Zoom
The two layers of every agent. In the middle sits the model - a stateless next-token text predictor that reasons in words but cannot act, remember or be trusted without checking. Around it sits the scaffolding: ordinary, deterministic code that gives the model tools, manages its memory and context, runs the loop and enforces limits and human checkpoints. Capability rides on the model; reliability and control ride on the scaffolding you shape.

The model only predicts text. It is stateless, cannot act, and is fluent whether right or wrong.

The scaffolding: the code that lets a model act and remember

If the model can only produce text, how does an agent search the web, edit a drawing schedule or run an analysis? The answer is that the scaffolding gives the model's text a way to *mean* an action, and then carries it out. The trick is beautifully simple. The harness tells the model, in its instructions, that it has a set of tools it can use, and that to use one it should emit text in an agreed format - effectively, 'I want to call the search tool with this query.' The model, being a next-token predictor that has been trained to follow such instructions, emits exactly that text when it decides a search would help. The scaffolding is watching the model's output; when it sees a properly formatted tool request, it does not just display it - it actually runs the search, captures the result, and pastes that result back into the text the model sees next. On the model's side this is all still just text in, text out. On the world's side, a real action happened. (Lesson 1.2 opens up tools in full.)

The scaffolding does three jobs the model cannot do for itself. It executes tools - turning the model's text requests into real calls to search engines, file systems, software APIs, calculators, other programs - and returns the results. It manages memory and context - deciding what text to keep in front of the model each turn, what to summarise, what to store and retrieve later, so the model can hold the state of a long job despite being stateless (Lesson 1.3). And it runs the loop - repeatedly calling the model, executing whatever it asks for, feeding the outcome back, and continuing until the goal is met or a stopping condition is hit (the next section). None of this is intelligent in the way the model is; it is ordinary, testable, deterministic software - which is precisely why it is where an agent's *reliability* is engineered.

This is why two agents built on the very same underlying model can feel wildly different: one careful, well-behaved and useful, another erratic and unsafe. The model is the same; the scaffolding - the instructions, the tools it is given, the checks, the guardrails, the way memory is handled, where a human is asked to confirm - is different. A large part of the craft you are learning in this course lives in that layer, not in the model. When you configure an agent, choose its tools, write its instructions or decide where it must pause for your approval, you are shaping the scaffolding, and that is where you exercise control.

THE AGENT LOOP - THINK, ACT, OBSERVE, ADJUSTGOAL handed over1 assemble contextgoal + history + tools2 call MODELreason: act or done?3 execute TOOLreal action happens4 observe resultfeed back + adjustDONE -> report back
Zoom
The agent loop - what makes an agent more than a chatbot. The scaffolding assembles the context and calls the model; the model either reasons and requests a tool or signals it is done; the scaffolding executes the tool and feeds the result back; and the cycle repeats - think, act, observe, adjust - until the goal is met or a limit or human checkpoint stops it. A chatbot is a single pass through this diagram; an agent runs the loop many times on one goal you handed over.

The agent loop: think, act, observe, repeat

Put the model and the scaffolding together and you get the beating heart of every agent: the loop. It runs, in essence, like this. The scaffolding assembles the current context - your goal, the instructions, the tools available, and whatever has happened so far - and calls the model. The model produces text: either a step of reasoning and a request to use a tool, or a signal that it is finished. If it asked for a tool, the scaffolding executes that tool, captures the result, adds it to the context, and calls the model again with this new information. The model observes what came back, decides the next step, and the cycle continues - think, act, observe, adjust - until the model judges the goal met, or the harness stops it for hitting a limit, a budget, or a checkpoint where a human must approve.

This loop is what makes an agent qualitatively different from a chatbot. A chatbot is one turn: prompt in, answer out, done. An agent is that same model call placed inside a loop that can run many times, each iteration able to gather new information and act on it, so a single goal you hand over becomes dozens of internal steps you never individually issued. 'Research the precedents for a mid-size civic library and summarise what makes them work' becomes: search, read a result, search again with a refined query, read more, note a pattern, check a figure, draft a summary, review it - many think-act-observe cycles, driven by the model's own decisions within the frame the scaffolding sets. That is the autonomy people mean by 'agentic': not a smarter answer, but a *loop* that keeps going without you steering each step.

Seeing the loop clearly changes how you work with agents. It tells you why an agent can recover from a dead end - a failed search, a tool error - by observing the failure and trying something else, the way a one-shot answer never could. It also tells you where things go wrong: a loop can wander, repeat itself, pursue a bad plan with great persistence, or burn time and money going in circles, because nothing in the mechanism guarantees the steps are *good* - only that they keep happening. And it shows you exactly where your control points are: the goal and instructions you set at the start, the tools you allow, the limits and checkpoints the scaffolding enforces, and the verification you apply to what comes out. The loop does the work; you design its edges and judge its result.

THE AGENT LOOP - THINK, ACT, OBSERVE, ADJUSTGOAL handed over1 assemble contextgoal + history + tools2 call MODELreason: act or done?3 execute TOOLreal action happens4 observe resultfeed back + adjustDONE -> report back
Zoom
The agent loop - what makes an agent more than a chatbot. The scaffolding assembles the context and calls the model; the model either reasons and requests a tool or signals it is done; the scaffolding executes the tool and feeds the result back; and the cycle repeats - think, act, observe, adjust - until the goal is met or a limit or human checkpoint stops it. A chatbot is a single pass through this diagram; an agent runs the loop many times on one goal you handed over.

Think -> act -> observe -> adjust, over and over. A chatbot is one turn; an agent is the loop.

Knowing which part did what - and why it matters to you

Once you can see the seam between model and scaffolding, a lot of agent behaviour stops being mysterious and becomes diagnosable - which is exactly the practical skill a professional needs. When an agent produces something wrong, ask *which layer* failed. Did the model reason badly - misread the brief, invent a code clause, draw a faulty conclusion from good information? That is a reasoning or knowledge failure, addressed by better instructions, better context, a stronger model, or - always - your verification. Or did the scaffolding fail - the wrong tool was available or missing, a tool returned bad data, the context got too full and important information fell out, the loop ran away without a checkpoint? That is an engineering failure, addressed by changing the setup, not by arguing with the model. Blaming the model for a scaffolding problem (or vice versa) wastes your time; naming the layer points you at the fix.

The division also tells you where capability and where reliability come from, and they come from different places. Capability - how well the agent reasons, writes, weighs options, understands your intent - rides mostly on the model, and improves as models improve, largely outside your control. Reliability - whether the agent stays on task, uses the right tools, keeps the necessary information in view, stops to check, and does not act beyond its remit - rides mostly on the scaffolding, which is very much in your control and is where good agent design earns its keep. For a designer this is liberating: you do not need to build or understand the model to use agents well, but you do need to understand and shape the scaffolding - the instructions, tools, memory and checkpoints - because that is the part you actually configure and the part that keeps the work safe.

And it keeps the through-line of the course sharp. Neither layer carries professional responsibility. The model is a text predictor that is sometimes confidently wrong; the scaffolding is deterministic code that does exactly and only what it was built to do. Between them they can do a remarkable amount of the multi-step work around design - but the judgement about whether the result is good, safe and right for this project, and the accountability for it, sit with you. Understanding the machine is not so you can trust it more blindly; it is so you can direct it precisely and verify it intelligently, as the human who remains the author and the architect of record.

Anatomy check: name the layer before you trust or blame it

The language model (LLM)

Reasoning, language, next-token prediction

The engine: reads text, produces text. Stateless, cannot act, fluent whether right or wrong. Source of capability - and of hallucination. Verify anything factual. Lesson 8.1.

The scaffolding / harness

Tools, memory, the loop, checkpoints

Ordinary deterministic code around the model. Executes actions, manages context, runs the loop, enforces limits. Where reliability and your control live. Lessons 1.2-1.3, 7.

The agent loop

Think - act - observe - adjust, repeated

What makes an agent more than a chatbot: many model calls, each able to act and observe, until the goal is met or a limit stops it. Set its edges; verify its result.

Named models & frameworks

Specific LLMs, agent toolkits, harnesses

Move constantly - illustrative as of 2026. The anatomy (model + scaffolding + loop) is durable; treat any named product as an example to verify against the current state.

Hands-on workshop

Workshop - narrate the loop of an agent you have watched

You understand the machine best by tracing it on a real run. In this workshop you take one thing you have seen an AI agent do - or one you set it to do now - and reconstruct it as model-versus-scaffolding, step by step, so the seam becomes concrete rather than theoretical.

Any agentic AI tool you can watch work, or detailed notes from one you have used, plus a notebook. The point is to see the loop, not to build one.

Given & goal
Goal: see the model/scaffolding/loop split in a real agent run
Inputs: access to any agentic AI tool (or notes from one you have used) + this lesson + a notebook
Time: ~40 minutes
  1. 1Pick one multi-step task and either recall a real agent run of it or set an agent going on it now (e.g. 'gather five precedents for a small clinic and summarise them'). Watch what it does.
  2. 2Write the goal you handed over in one line, then list every distinct STEP the agent took that you can observe or infer (searched, read, searched again, drafted, revised...). This is the loop made visible.
  3. 3For each step, tag it MODEL (a decision or piece of text the model produced - what to do next, a draft, a judgement) or SCAFFOLDING (a real action the harness executed - a search, a file read, a calculation - and the result fed back).
  4. 4Mark every point where the agent OBSERVED a result and CHANGED course because of it (a failed search, a surprising figure). These are the think-act-observe-adjust turns that make it an agent, not a chatbot.
  5. 5Find one thing the agent got wrong or shaky, and diagnose the LAYER: was it the model reasoning badly, or the scaffolding (wrong/missing tool, lost context, runaway loop)? Note what you would change - and what you would verify before relying on the output.

You’ll walk away with
A one-page trace of a real agent run, each step tagged model or scaffolding, the observe-and-adjust turns marked, and one failure diagnosed by layer with a fix and a verification note. Keep it - it is your first map of the machine you will be directing all course.

The worked example

Three altitudes on the same idea

Read the band that fits you — or all three.

For the architectAgentic tools across practice — you stay the architect of record

Knowing the model/scaffolding seam is what lets you specify and govern agents in a practice rather than just consume them. When you brief a vendor, configure a tool, or decide where an agent may act in your workflow, you are shaping scaffolding - the tools it can touch, the limits, the human checkpoints - and that is where you engineer reliability and keep control of anything touching code, safety or a commitment. The model supplies capability that improves on its own; your job is the surrounding discipline. When an output is wrong, diagnose the layer - reasoning versus setup - and fix the right one; and remember that neither layer holds the duty of care, which stays with you as architect of record.

For the interior designerAgents for research, concept, docs & the studio workflow

You do not need to code to grasp the one idea that makes agents usable: a fluent text model in the middle, ordinary software around it that lets it act and remember. That picture tells you why an agent can pull research, draft a spec or a client note and iterate on it - the loop - and why it can also state an invented product fact with total confidence: the model is a plausible-text machine, not a truth machine. Treat its output as a capable draft to judge, lean on the scaffolding (tools, checkpoints) for anything that becomes a commitment, and keep the taste and the client relationship firmly on your side of the seam.

For the studentWhat AI agents are and how to work with them well

Learn this anatomy now and most agent behaviour will make sense for the rest of your career, however fast the tools change. The model predicts text and is stateless and sometimes confidently wrong; the scaffolding gives it tools, memory and a loop so it can do multi-step work. When an agent impresses you, notice it is the loop plus tools, not a mind; when it fails, ask which layer broke. Build the habit of directing the parts you control - the goal, the instructions, the tools, the checkpoints - and verifying the output, because the machine supplies capability but never judgement, and never responsibility.

Misconception check

An AI agent is basically a much smarter, upgraded version of the chatbot - the model itself got good enough to start using tools, remembering things and doing whole tasks on its own.

The underlying model did not fundamentally change its nature; it is still a next-token text predictor that is stateless and cannot act. What changed is the software wrapped around it. An agent is a model plus scaffolding: a loop that calls the model repeatedly, a set of tools the model can invoke by emitting text in an agreed format, and a memory/context layer that carries information forward. The 'using tools, remembering, doing tasks' all happen in that surrounding code, not inside the model - the model just decides, in text, what it wants to do, and the harness makes it real and feeds back the result. This matters because it tells you where capability comes from (mostly the model) versus where reliability and control come from (mostly the scaffolding you shape), and it explains the failure modes: a model that is fluently wrong, a loop that wanders, a context that overflows. Mistaking the agent for a single smart mind leads you to trust it as an oracle; seeing the two layers lets you direct and verify it as the professional in charge.
Try it

Do it yourself

No tools needed - reason it through from the anatomy.

  1. 1In one sentence, what is the one thing a large language model actually does?
  2. 2Name the three jobs the scaffolding does that the raw model cannot do for itself.
  3. 3Describe the agent loop in four words, and say what makes it different from a single chatbot turn.
  4. 4An agent invents a building-code clause that does not exist. Which layer failed, and how would you address it?
  5. 5Two agents built on the same model behave very differently - one careful, one erratic. What explains the difference, and what does that tell you about where your control lies?
Take this with you

The one line to carry out

A large language model only predicts text and cannot act or remember; it becomes an agent when scaffolding wraps it in a loop that lets it use tools and carry information forward - so capability rides on the model, reliability and control ride on the scaffolding you shape, and judgement and responsibility ride on you.
Take it further
References & further reading

Peer-reviewed journals & authoritative standards

  1. 01Large language modelWikipedia - Large language model, 2026.
  2. 02Intelligent agentWikipedia - Intelligent agent, 2026.
  3. 03Software agentWikipedia - Software agent, 2026.
  4. 04Agentic AIWikipedia - Agentic AI, 2026.
Related lessons
Recap
An AI agent is not a single smart mind but two layers working together. In the middle sits a large language model - a next-token text predictor that is stateless, cannot take actions on its own, and is fluent whether or not it is correct. Around it sits the scaffolding: ordinary, deterministic code that gives the model tools (which it invokes by emitting text in an agreed format), manages its memory and context, and runs the loop - calling the model, executing what it asks, feeding the result back, and repeating think-act-observe-adjust until the goal is met or a limit stops it. That loop is what makes an agent more than a chatbot. Seeing the seam lets you diagnose failures by layer, understand that capability comes mostly from the model while reliability and control come mostly from the scaffolding you shape, and remember that neither layer holds judgement or professional responsibility - those stay with you.
Carry forward →

The scaffolding's most consequential gift to the model is the ability to act. Next we open up tools and function-calling in full - exactly how an agent turns a line of text into a real search, a file edit or an API call, and why that is what turns talk into work.

A

The author

Amogh N P

Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.

More about Amogh →