Agentic AI
Key idea: An agent is a model that runs tools in a loop. It pauses generation, hands off to something outside itself, and continues with the result spliced in.
Used in My First Language Model and Build, break, extend --- ready-to-run lessons and talks that include this module.
Turn your Language model A system that predicts what text comes next, using patterns learned from training data. Your hand-built grid, a cutouts spread, a booklet, and a room holding search sheets are all language models. View in glossary into an Agent A language model that runs tools in a loop to achieve a goal. "Agentic AI" has become a buzzword, but in practice it means tool use: the model generates, a tool is called, the result is written back into the text, and generation continues. View in glossary . Nothing about the model changes: you add a rule for when to pause, what to ask, and how to carry on once the answer comes back.

You will need
- any model you can generate from—a pre-trained booklet works best, but a grid or a cutouts spread is fine
- dice, pen and paper as per Generation
- at least one phone per group, and three friends or group chats who’ll reply within a few minutes
Your goal
Generate a passage in which every sentence ends with a tool call: the model writes until it lands on punctuation, you text a friend for what comes next, and the reply goes into the text. Stretch goal: design a tool of your own (see the variation below) and bolt it on the same way.
Key idea
In practice, calling a language model an “agent” comes down to Tool use The mechanism by which a language model calls something outside itself (a calculator, a web search, a database, a code runner) during generation. A modern LLM emits a structured tool call; the software around it, the harness, pauses generation, runs the tool, and splices the result back in. In the unplugged activity, sampling a full stop plays the part of the tool call and you are the harness. View in glossary : the model produces something that the system around it treats as a request, generation pauses, the request goes out to a tool, and the result is written back into the text before generation continues. The loop is generate → call tool → splice in the result → keep generating. Here the tool is a text message to a friend.
The recipe
- Generate from your model as usual, rolling for each next Token A single unit of text that the model works with. In our activities each word and punctuation mark is a token. Modern LLMs use subword tokens, so a long or unusual word may be split into several. View in glossary .
- When you land on a punctuation token (
.,,,!,?), pause. That’s a tool call. - Text What comes next? “[the sentence so far]…” (everything since the last full stop) to three friends or group chats.
- Write down the whole of the first reply, then the punctuation token you rolled.
- Continue generating from that punctuation token.
Replies take time. If none has arrived by the time you hit the next punctuation token, leave a gap and back-fill it when one does.
Worked example
Your text so far is “the cat sat”, and the next roll gives you .. Pause:
that’s a tool call.
Text What comes next? "the cat sat..." to three friends. The first reply back
is “down by the river”.
Write down by the river, then the . you rolled anyway, and carry on
generating from .:
the cat sat down by the river. …
The punctuation is the trigger, the question plus the sentence so far is the
tool’s input, and the reply is the tool’s result. The reply’s words probably
aren’t in your model’s
Vocabulary
All the distinct tokens a model knows. The words down the side and across the top of your grid, or the set of previous-word labels on a cutouts spread, form your vocabulary. A model can only ever produce a token from its vocabulary.
View in glossary
, which is why you resume from the punctuation
you rolled rather than from the friend’s last word: the model can always
continue from ., but it has no row for river.
Instructor notes
Running it
- brief the room on the recipe before anyone rolls, and walk the worked example slowly; steps 2 and 4 are where groups go wrong (forgetting to write the punctuation back in after the reply)
- ten minutes is plenty; keep groups moving and circulate
- groups without a willing friend can text a group chat, a colleague across the room, or use one of the tools from the variation below
Variation: trigger-word cutouts
For the cutouts flavour, and for groups who want to design tools as well as call one, add explicit trigger tokens to the model instead of using punctuation. Each tool has a trigger word, a capability and a return format:
| Trigger word | Tool | Capability | Returns |
|---|---|---|---|
ACTION | a chosen person | perform a small physical action | a word for what they did |
GOOGLE | someone with a phone | search the web for a continuation | one word from the top result |
FRIEND | everyone texts a friend | ask them what comes next | first reply wins |
Add the trigger cutouts to the spread where they fit contextually (GOOGLE
after a or the, ACTION after we or I), each closing with a . on the
same cutout so the chain resumes cleanly after the tool returns. The CLI does
this for you:
llms_unplugged cutouts -i data/<text>.txt -n 2 --tool ACTION --tool GOOGLE
seeds each trigger at the corpus’s most common contexts and prints it
black-on-gold so it can’t be mistaken for a corpus word. This is the version we
run in Build, break, extend.
Other tools to try, on the same pattern: LOOK (an object in the room returns a
word for what it is), NAME (the room points at someone), TIME (a clock),
ASK (a designated expert returns a short phrase). In each case something
outside the model returns some text, and a closing token brings you back.
Discussion questions
- what did the tool calls add that the bare model couldn’t? did the friends’ words fit the text, or derail it?
- how does the model “know” to call a tool? (it doesn’t—it just landed on the trigger)
- who was running the loop? (you were: you decided when to pause, who to ask, and what to splice back in. Take that away and the agent acts on its own)
- what would you be comfortable letting an agent do without asking you first? where’s the line, and why—reversibility, who gets blamed, whether you’d notice a mistake?
- could a tool’s reply change what the model generates next? (here, no—see below)
Connection to current LLMs
“Agentic AI” has become a buzzword, but in practice it really just means tool use in a loop. As Simon Willison puts it, an LLM (Large Language Model) A language model trained on a very large amount of text, with billions of parameters. The hand-built models in these lessons are tiny language models; ChatGPT, Claude and Gemini are large ones. The core principles are identical. The difference is scale. View in glossary agent is something that “runs tools in a loop to achieve a goal”—and that’s exactly what your model just did.
(also called “function calling”) is how modern Chatbot (ChatGPT, Claude, Gemini) A product that wraps an LLM in a conversation. ChatGPT is OpenAI's, Claude is Anthropic's, Gemini is Google's, and there are many others. On this site we often name ChatGPT or Claude as shorthand for any of them: the concepts apply equally to every modern LLM chatbot, whichever one you use. View in glossary act in the world:
- the agentic loop: generate → detect a tool call → execute the tool → feed the result back → continue generating, exactly like your punctuation-and-text cycle
- the harness: the software around the model that pauses it, makes the call, and splices the result back in. In the room, that was you
- structured calls: real models emit a JSON-formatted tool call (function name, arguments) rather than a full stop, but the mechanism is the same
- examples: web search, code execution, database queries, sending an email, booking a flight, moving money
- chaining: real agents make many tool calls in sequence, planning and adjusting as results come in
The key insight: the model doesn’t know anything the tool returns—it only learns when to ask. A real model does differ in one way: it reads the tool’s result and conditions on it, whereas your bigram carries on from the punctuation as if the reply never happened, because one word of Context window How many previous tokens the model can consider when it predicts the next one. A bigram has a context window of one word and a trigram of two; modern LLMs can consider hundreds of thousands or even millions of tokens. View in glossary can’t hold it. Everything the friend contributed is in the transcript, but not in the model’s next choice. The In-context Learning module is where the text you’ve already written starts to feed back in.