Mark Levy/Writing/The Word Machine

[ Floor 3 of 3 ] The harness
Agents, tools, rules files, subagents, hooks, and evals: the scaffolding around the one machine.
New here? Floor 1 is the machine itself and Floor 2 is the plumbing that makes it a chat. This floor assumes both.
Floor 1 established the monster: given some text, predict a plausible next word, with trillions of frozen knobs and the context as its only memory. Floor 2 showed the costume: a transcript that ends with ASSISTANT:, so the plausible continuation is an answer. Nothing on either floor could do anything. The machine writes; that's all.
This floor is what happens when the plumbing gets ambitious. Let the machine's text be read by a program that will act on it (run the code, open the file, search the web) and paste back what happened. Wrap that in rules. Give it a budget, a map, a few helpers. The result is what the current vocabulary calls an agent, and the program around the machine is a harness. Everything else you hear about (tools, MCP, system prompts, CLAUDE.md, subagents, hooks, guardrails, evals, context engineering) is a part of that harness.
The frame for this floor is the tabletop game, because it fits unusually well: a player who can only say what they'd do, and a dungeon master who decides what actually happens. Six rooms. Same rule as before: every demo is a hand-built toy, and the point is the mechanism.
Room 1 of 6The Dungeon Master
At a game table the player never touches the world. They say what they'd do: "I check the door for traps." The dungeon master resolves it against the world and narrates what happened; the player decides again. The machine is the player. It only ever emits text.
A harness is the dungeon master: a plain program that reads the machine's output, notices when it's a request to do something, does it, pastes the result into the context, and runs the machine again. Repeat until the machine writes a final answer instead of a request. That loop, with the machine inside it, is what agent means. Step through one.
The machine never acts. It writes a request in a shape the harness recognizes; the harness acts and pastes back what happened. Every "agent" you'll meet is this loop, and its autonomy is just the number of turns it takes before a human is asked.
Room 2 of 6The Character Sheet
A character is a sheet of paper: class, stats, equipment, a few lines of backstory. None of it lives in the player's head. It's re-read every time it matters. A harness hands the machine a sheet the same way: a role, house rules, facts about the project, an example of good output, the format to answer in. That's a system prompt, a rules file, a persona. All text, placed in the context every pass, enforced by nothing but the attention look-backs from Floor 1, Room 4.
The whole trade is visible on the sheet. Every line makes the wanted next word likelier, and every line costs tokens and attention. Build one and watch the answer change; then add the forty-page style guide and watch it drift.
Scaffolding is text. It works by making the wanted next word the likely one, and it costs exactly what text costs: tokens on every pass, and attention that a longer sheet spreads thinner.
Room 3 of 6The Spellbook
A spell is an entry in a book: a name, what it does, what it needs. The player casts by speaking the incantation; the dungeon master decides what happens. A tool works exactly this way. The harness writes each tool's entry (name, description, the shape of its arguments) into the context as text. The machine "casts" by writing the incantation: a small structured message naming the tool and its arguments. It has no idea whether the spell is real. It writes the incantation because, given the sheet and the training, an incantation of that shape is the likely next thing. The harness reads it, runs real code, and pastes the result back (Room 1).
Take the entry out of the book and the spell is gone. The machine will then do what it always does: write a plausible answer. Try it.
A tool is a description in the context plus a promise from the harness. Remove the description and the spell is gone. Keep it and you've paid for it on every pass, cast or not, which is why a harness with three hundred tools is slower and dimmer than one with the twelve it needs.
Room 4 of 6The Familiars
One context window fills up (Floor 1, Room 5), and everything the machine reads competes for attention. So a harness can summon a familiar: a fresh run of the same machine with a fresh, empty context, handed one task and only the text it needs. The familiar works in its own window. Only its final report comes back to the summoner.
Familiars share nothing. They can't see the main conversation, and the main loop never sees their working. That's the point: the log file the familiar read never enters the main window; three lines of summary do. Deciding what to delegate, to how many familiars, in what order, is orchestration, and the orchestrator is the same machine wearing a different sheet.
A familiar is the same machine with an empty context. Delegation buys room and parallelism. It costs shared memory, so the summons has to carry everything the familiar needs, and the report has to carry everything you need back.
Room 5 of 6Wards and Traps
The machine is a bettor (Floor 1, Room 6), and now it has hands. So the harness carves wards at the doors: rules written in ordinary code that run whether or not the machine "remembers" them. Before a tool runs: is this command on the allowlist? Does deleting a directory need a human's yes? After a tool runs: run the formatter, run the tests, paste the failures back so the next turn sees them. Before the harness ships at all: run it against a fixed set of tasks with known answers and grade it. Those are evals.
None of this lives inside the machine, which is exactly why it's reliable. A ward doesn't get tired at line 400 of a long context. Step through a session with the wards up, then drop them.
Anything that must be true every time belongs in a ward, not on the sheet. The sheet persuades; the ward enforces. And a harness is judged by its evals, not by one impressive run: a single good session is a bet paying off, a graded set of fifty tasks is a measurement.
Room 6 of 6The Map
Everything on this floor lands in one place: the context window. The sheet, the spellbook, the tool results, the familiars' reports, the conversation so far. It's a backpack with a weight limit, and the harness's real job, under all the other names, is packing it: what goes in this turn, what gets summarized, what gets thrown out, what gets fetched only when needed.
The moves have names. Compaction replaces old turns with a summary. Memory files are notes written to disk and re-read next session. Retrieval fetches the few documents that matter (RAG, from Floor 2's inventory). Loading on demand keeps a skill's instructions out of the pack until the task calls for them. Truncation turns a 50,000-line tool result into its first and last hundred. Pack the bag.
The harness's real job is deciding what the machine reads. Every feature on this floor is a packing strategy, and a small, relevant pack beats a large, complete one, because attention is the budget that matters (Floor 1, Room 4).
InventoryThe harness vocabulary
The words of current AI development, each with its exact address on this floor:
Every item is text or code around the machine. Not one of them changed a knob. The vocabulary is large because the scaffolding is large; the thing being scaffolded is still the guessing game from the top of Floor 1.
Dungeon clearedWhat this buys you
Four rules fall straight out of these six rooms, and they are the rules people building with these tools keep re-learning:
That's the dungeon. One monster that guesses the next word; a costume that makes it answer; a loop that gives it hands; a sheet, a spellbook, familiars, wards, and a backpack around it. All of it text and code around the one trick at the top of Floor 1, and, used with that in mind, the most useful scaffolding anyone has built around a word machine.
Dungeon cleared. There is no Floor 4 yet. When there is, the map will say so.
Back to the map Start again from Floor 1The loop-with-hands framing and the workflow-versus-agent distinction follow Anthropic's "Building effective agents". The backpack in Room 6 follows their "Effective context engineering for AI agents", and the evals stance follows "Demystifying evals for AI agents". The spellbook format is the Model Context Protocol.
The machine's mechanics are Floor 1's territory and follow John Mount's "A Simplified Mental Model of LLMs"; this floor extends the same non-magical framing to the scaffolding. All demos on this page are illustrative toys, not real model outputs, and the token counts are round numbers chosen to make the shapes visible.