Mark Levy/Writing/The Word Warp Drive

An 8-bit away mission on a purple alien plain under two moons: three officers in red, mustard, and teal uniforms hold tricorders beside a shimmering transporter column, while a figure in white robes watches from a rock.

[ Deck 3 of 3 ] Away Missions: the agent

The Word Warp Drive

Agents, tools, standing orders, away teams, safety protocols, and evals: the crew around the one core.

Q
You typeFix the failing test in parse.ts
Still one core. The crew around it just got a mission. So, it turns out, did I.

Deck 1 established the core: given some text, predict a plausible next word, with trillions of frozen knobs and the context as its only memory. Deck 2 showed the costume: a transcript that ends with ASSISTANT:, so the plausible continuation is an answer. Nothing on either deck could do anything. The core writes; that's all.

This deck is what happens when the plumbing gets ambitious. Let the core'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 briefing, a few helpers. The result is what the current vocabulary calls an agent, and the program around the core 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 deck is the bridge, because it fits unusually well: a captain who can only say what should happen, and a crew who make it happen and report back. Six sections. Same rule as before: every demo is hand-built, and the point is the mechanism.

QFull disclosure: you've had a crew this whole cruise. Something has been reading what you do, deciding what happens, and telling you. That's the job, and it's this entire deck: the crew is to the captain what a harness is to the core.

Section 1 of 6Make It So

A harness is a loop with hands

On the bridge the captain never touches the world. The captain says what should happen: "Scan that ship for life signs." The crew run it against the world and report back what happened; the captain decides again. The core is the captain. It only ever emits text.

A harness is the crew: a plain program that reads the core's output, notices when it's a request to do something, does it, pastes the result into the context, and runs the core again. Repeat until the core writes a final answer instead of a request. That loop, with the core inside it, is what agent means. Step through one.

The bridge: one task, five turnshand-built demo
The taskHow much did we spend on hosting last quarter? The invoices are in /invoices.
The bridge is quiet. The captain has not spoken yet.
Captain's log

The core 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.

Back on Earth Agent mode in a coding tool, an agentic workflow, an AI that "browses the web for you": all this loop. When the core's request names a function and its arguments, the vendors call it tool use or function calling. A workflow is the same parts with the order fixed in code ahead of time; an agent is when the core's own output decides what happens next.
QPicard says "Engage." The ship moves because the crew moves it; he never touches the console. Seven seasons of "Engage," and the button was always somebody else's. That's the loop: the word is the captain's, the hands are the crew's.

Section 2 of 6Standing Orders

Scaffolding is text that shapes the next word

A starship runs on standing orders: the rules of engagement, the mission, the chain of command, written down and posted on the bridge. None of it lives in the captain's head. It's re-read every time it matters. A harness hands the core its orders 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 Deck 1, Section 4.

The whole trade is visible in the orders. Every line makes the wanted next word likelier, and every line costs tokens and attention. Build a set and watch the answer change; then add the forty-page style guide and watch it drift.

The orders builder: what lands in the context, and what comes outcanned outputs, for the shape
The requestReview this diff.
Captain's log

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 longer orders spread thinner.

Back on Earth The system prompt, a CLAUDE.md or AGENTS.md at the root of a repo, "custom instructions," a saved persona, the two examples you paste in before your question (few-shot): all standing orders. The craft of writing them was called prompt engineering; as harnesses grew, the name widened to context engineering (Section 6), because the orders are only one thing in the briefing.
QThe Prime Directive is text. It holds exactly as long as everyone on the bridge keeps re-reading it, and it gets violated the week they don't, which is roughly every third episode. That's an order, not a protocol. Hold that thought until Section 5.

Section 3 of 6Ship's Systems

Tools are systems the crew agreed to run

A ship's system is an entry on the console: a name, what it does, what it needs. The captain uses it by giving the order; the crew decide 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 core "calls" it by writing the order: a small structured message naming the tool and its arguments. It has no idea whether the system is real. It writes the order because, given the standing orders and the training, an order of that shape is the likely next thing. The harness reads it, runs real code, and pastes the result back (Section 1).

Take the entry off the console and the system is gone. The core will then do what it always does: write a plausible answer. Try it.

The systems list: which entries are in the contextcanned outputs, for the shape
The requestWhat's the weather in Portland right now?
Choose the systems on the console, then ask.
Captain's log

A tool is a description in the context plus a promise from the harness. Remove the description and the system is gone. Keep it and you've paid for it on every pass, called or not, which is why a harness with three hundred tools is slower and dimmer than one with the twelve it needs.

Back on Earth Tool use, function calling, "connectors," "integrations," plugins: entries on the console. MCP (Model Context Protocol) is a shared console format, so a weather server, a database, or your calendar can publish its systems once and any harness can read them. Computer use is the same trick with a very general system: a screenshot comes in as patches (Deck 2, Section 5), and the order is a click at coordinates.
Q"Energize," said on a ship with no transporter, is a word spoken aloud in a quiet room. The order is identical; the system isn't there. And the reason every system on this ship answers to the same console is the reason MCP exists.

Section 4 of 6Away Teams

Subagents: the same core with an empty briefing

One context window fills up (Deck 1, Section 5), and everything the core reads competes for attention. So a harness can send an away team: a fresh run of the same core with a fresh, empty context, handed one task and only the text it needs. The team works in its own window. Only its final report comes back to the bridge.

Away teams share nothing. They can't see the bridge, and the main loop never sees their working. That's the point: the log file the team read never enters the main window; three lines of report do. Deciding what to delegate, to how many teams, in what order, is orchestration, and the orchestrator is the same core under different orders.

The transporter room: two ways to read a very large loghand-built demo, illustrative numbers
The main loop is at 38,000 tokens: standing orders, a systems list, and a conversation. The log is 92,000 tokens.
Captain's log

An away team is the same core with an empty context. Delegation buys room and parallelism. It costs shared memory, so the briefing has to carry everything the team needs, and the report has to carry everything you need back.

Back on Earth Subagents, "agent teams," orchestrator and workers, "swarms," multi-agent systems: away teams under different orders. The failure you'll meet first is a briefing that forgot to include something obvious, because the team has no idea what "the file we were just discussing" refers to.
QRiker's away team beams down knowing exactly what was in the briefing and nothing else. Nobody mentioned the warbird. Nobody mentioned "the file we discussed," either, and now three officers are standing on a planet wondering which file.

Section 5 of 6Safety Protocols

Guardrails: what the crew enforces, the captain can't override

The core is a bettor (Deck 1, Section 6), and now it has hands. So the harness runs safety protocols at every station: rules written in ordinary code that run whether or not the core "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 core, which is exactly why it's reliable. A protocol doesn't get tired at line 400 of a long context. Step through a session with the protocols on, then switch them off.

The safety protocols: four proposed actionscanned outputs, for the shape
Evals on this harness build: 47 of 50 tasks pass
The core is about to propose its first action.
Captain's log

Anything that must be true every time belongs in a protocol, not in the orders. The orders persuade; the protocol 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.

Back on Earth Hooks are protocols at fixed points in the loop (before a tool, after a tool, at session start). Permission modes and allowlists are protocols on the systems list. A sandbox is a protocol on the whole world: the hands can only reach a holodeck copy. Guardrails is the umbrella word, human-in-the-loop is the protocol that asks you, and evals are the protocol on the release, sometimes graded by another run of the core (LLM-as-judge), which is a bettor grading a bettor and should be checked like one.
QSwitch the holodeck safeties off and Moriarty's bullets are real. The self-destruct needs two officers' voices, which is human-in-the-loop with a countdown. And Kirk beat the Kobayashi Maru by editing the eval. Starfleet gave him a commendation. Don't.

Section 6 of 6The Briefing Room

Context engineering: deciding what the core reads

Everything on this deck lands in one place: the context window. The orders, the systems list, the tool results, the away-team reports, the conversation so far. It's a briefing with a length limit, and the harness's real job, under all the other names, is preparing 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 Deck 2's manifest). Loading on demand keeps a skill's instructions out of the briefing until the task calls for them. Truncation turns a 50,000-line tool result into its first and last hundred. Prepare the briefing.

The briefing: a 200,000-token windowhand-built demo, illustrative numbers
Captain's log

The harness's real job is deciding what the core reads. Every feature on this deck is a briefing strategy, and a short, relevant briefing beats a long, complete one, because attention is the budget that matters (Deck 1, Section 4).

Back on Earth Context engineering is the name for this section. Compaction is what a coding agent does when the session gets long. Memory files, skills that load only when their name comes up, RAG over your documents: each is a way to keep the briefing short. A model with a "long context" has a bigger briefing room; a harness with good context engineering runs a better briefing.
QIn the observation lounge Picard hears three sentences from each officer, not the raw sensor logs. Geordi read the logs; Geordi summarizes. That is the entire discipline, and it's why the captain can still think at turn forty.

ManifestThe harness vocabulary

What's in the cargo bay

The words of current AI development, each with its exact address on this deck:

Manifest: 15 items
  • harnessThe program around the core (Section 1): it runs the loop, holds the orders and the systems list, executes tools, keeps the protocols, and prepares the briefing. The crew.
  • agentThe core inside a harness loop, where its own output decides the next action. A workflow is the same parts with the order fixed in code.
  • tool use · function callingThe core writing a structured request (Section 3) that the harness recognizes and executes. The order, not the system.
  • MCPModel Context Protocol: a shared console format, so a server can publish tools and resources once and any harness can list them into the context.
  • system prompt · rules fileThe standing orders (Section 2): a role, house rules, project facts, and format, as text at the top of every pass. CLAUDE.md and AGENTS.md are orders that live in the repo.
  • skillA standing order loaded on demand (Section 6): instructions for one kind of task, kept out of the briefing until the task calls for it.
  • hookA safety protocol at a fixed point in the loop (Section 5): code that runs before or after a tool, or at session start and end, regardless of what the core remembers.
  • subagentAn away team (Section 4): the same core with an empty context, given one task, returning only a report.
  • orchestrationThe main loop deciding what to delegate, to how many teams, in what order. Done by the same core under an orchestrator's orders.
  • guardrails · permissionsSafety protocols on the systems list and the world (Section 5): allowlists, approval prompts, and policies enforced in code before a tool runs.
  • sandboxA protocol on the world itself: the hands only reach a holodeck copy, so a bad order costs a copy.
  • evalsA fixed set of tasks with known answers, run against the whole harness and graded. The measurement a demo is not.
  • compactionReplacing old turns with a summary so the briefing fits (Section 6). Nothing is remembered; a shorter text is read.
  • context engineeringSection 6 as a discipline: choosing what the core reads each turn. The successor to "prompt engineering" once the orders stopped being the only thing in the briefing.
  • human-in-the-loopThe protocol that asks you. Autonomy is how many turns pass between its questions.
Captain's log

Every item is text or code around the core. Not one of them changed a knob. The vocabulary is large because the crew is large; the thing being crewed is still the guessing game from the top of Deck 1.

TribunalThe Borg

Final tribunal: five charges, three shield levels

Q
Order. For the final tribunal I've borrowed the prosecution from a species with no concept of a defense: the Borg. A loop with hands, every system on the console, no protocols, and it has already assimilated two decks. Five charges. Each right answer dismisses one. Each wrong answer drops your shields and names the section to revisit; lose the shields and I snap my fingers and you're back at the door. This is the last door on the ship.
The courtroomresistance is the evidence

Mission completeWhat this buys you

Four commendations

Four rules fall straight out of these six sections, and they are the rules people building with these tools keep re-learning:

  • Put invariants in protocols and preferences in the orders. If a thing must be true every time, code enforces it. If it should usually be true, text suggests it. Confusing the two is how a "never push to main" rule ends up as a prompt that got outvoted at line 400.
  • Every addition is context. A tool, a rule, a file, an away team's report: each costs tokens and attention on every pass. Budget the briefing, not just the prose. The best harnesses are the ones that read less.
  • You are engineering the loop, not the model. The knobs are frozen. What you control is what the core reads, what it may do, and what comes back. That's the whole surface, and it's a lot.
  • Judge a harness by its evals, not its demos. One good session is a bet paying off. A graded set of tasks, re-run after every change to the orders, the systems list, or the protocols, is a measurement.

That's the ship. One core that guesses the next word; a costume that makes it answer; a crew that gives it hands; standing orders, ship's systems, away teams, safety protocols, and a briefing around it. All of it text and code around the one trick at the top of Deck 1, and, used with that in mind, the most useful crew anyone has assembled around a next-word engine.

Turbolift

Mission complete. Roll credits. There is no scene after the credits and no Deck 4 yet. When there is, the ship will say so.

Back to the ship Start again on Deck 1
Inspiration and further reading

The loop-with-hands framing and the workflow-versus-agent distinction follow Anthropic's "Building effective agents". The briefing in Section 6 follows their "Effective context engineering for AI agents", and the evals stance follows "Demystifying evals for AI agents". The shared console format is the Model Context Protocol.

The core's mechanics are Deck 1's territory and follow John Mount's "A Simplified Mental Model of LLMs"; this deck extends the same non-magical framing to the crew. The starship framing is an affectionate homage to a certain 1987 television series, with no affiliation. All demos on this page are illustrative, not real model outputs, and the token counts are round numbers chosen to make the shapes visible.