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.

[ Tier 2 · Deck 1 of 2 ] Away Missions: the agent

The Word Warp Drive

Tier 2 begins: 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 now has a mission. So do I.

Tier 1 gave the mechanism: Deck 1 was the word warp core, Deck 2 the bridge costume. Neither could act. The core writes text; that is all.

This deck covers ambitious plumbing: a program reads core output, takes actions (run code, open files, search web), and pastes results back. Add rules, budget, and briefing, and you get an agent. That surrounding program is the harness. Tools, MCP, system prompts, CLAUDE.md, subagents, hooks, guardrails, evals, and context engineering all live there.

Bridge framing still fits: captain issues text orders, crew acts and reports. Six sections, hand-built demos, mechanism first.

QDisclosure: you've had a crew all along. Something read your text, chose actions, and reported back. That's this deck: harness to core, crew to captain.

Section 1 of 6Make It So

A harness is a loop with hands

On the bridge, the captain does not touch the world. The captain states intent; the crew acts and reports; then command decides again. The core is that captain: text only.

A harness is the crew: code that reads model output, executes requested actions, pastes results into context, and reruns the model. Repeat until final answer. That loop is an agent.

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 requests; harness code acts and returns evidence. "Autonomy" is just turns between human checks.

Back on Earth Agent mode, agentic workflows, and AI that "browses for you" are this loop. Structured requests are tool use/function calling. A workflow fixes order in code; an agent lets model output choose next steps.
QPicard says "Engage." The crew moves the ship; he does not press the button. That's the loop: captains words, crews hands.

Section 2 of 6Standing Orders

Scaffolding is text that shapes the next word

Starships run on standing orders: mission, rules, chain of command, written and re-read. Harnesses do the same with role, house rules, project facts, examples, and output format. That's system prompt/rules file/persona text, inserted each pass and enforced only by attention look-backs from Deck 1, Section 4.

Every line makes wanted continuations likelier—and costs tokens and attention. Add too much and focus drifts.

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 nudges next-word odds and costs what text costs: tokens each pass and thinner attention as it grows.

Back on Earth System prompts, CLAUDE.md/AGENTS.md, custom instructions, saved personas, and few-shot examples are all standing orders. "Prompt engineering" widened into context engineering (Section 6) once orders became only one part of briefing.
QThe Prime Directive is text. It works when re-read, fails when ignored, and yes, that happens often. That's an order, not a protocol.

Section 3 of 6Ship's Systems

Tools are systems the crew agreed to run

A ship system is a console entry: name, behavior, required inputs. Tools are the same. Harnesses place tool schemas in context as text; the core "calls" them by emitting structured requests. The core does not know whether systems are real; it predicts that request shape. Harness code executes and pastes results back (Section 1).

Remove the console entry and the system disappears. The core returns to plausible text generation.

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 context description plus harness promise. Remove description, lose tool. Keep too many and you pay every pass, used or not.

Back on Earth Tool use, function calling, connectors, integrations, plugins: all console entries. MCP shares that console format across harnesses. Computer use is the same pattern with broad tools: screenshot patches in (Deck 2, Section 5), coordinate clicks out.
Q"Energize" on a ship without transporters is still a spoken order in a quiet room. Same words, no system. Shared console formats exist for this reason.

Section 4 of 6Away Teams

Subagents: the same core with an empty briefing

One context window fills up (Deck 1, Section 5), and everything competes for attention. So harnesses send away teams: fresh runs of the same core with empty context, one task, and only needed text. Team works in its own window; only final report returns.

Away teams share nothing by default. That is the benefit: massive logs stay off the main window, short reports return. Choosing delegation count and order is orchestration.

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 empty context. You gain room and parallelism, lose shared memory. Briefings and reports must carry what matters.

Back on Earth Subagents, agent teams, orchestrator + workers, swarms, multi-agent systems: away teams under varied orders. Common failure: missing briefing context like "the file we discussed."
QRiker's team beams down with exactly the briefing and nothing more. Omit "warbird" or "which file," and everyone improvises badly.

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 has hands, so harnesses enforce safety protocols in code. Before tools: allowlists, approvals. After tools: format/test and paste failures back. Those checkpoints are hooks, code that runs at fixed points in the loop rather than text that asks nicely. Before release: run fixed tasks with known answers—those are evals.

Protocols live outside the core, so they stay reliable even in long contexts. Compare sessions with protocols on and 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

Put invariants in protocols, not orders. Orders persuade; protocols enforce. Judge harnesses by eval sets, not one impressive run.

Back on Earth Hooks are loop checkpoints. Permission modes and allowlists are tool protocols. A sandbox limits world access. Guardrails is the umbrella, human-in-the-loop is the approval protocol, and evals are release protocols—sometimes with LLM-as-judge, which still needs checking.
QHolodeck safeties off make bullets real. Self-destruct requiring two voices is human-in-the-loop. Kirk beat the eval by editing the eval. Do not copy this method.

Section 6 of 6The Briefing Room

Context engineering: deciding what the core reads

Everything on this deck lands in one place: context window. Orders, system list, tool results, away-team reports, and conversation all compete in a bounded briefing. The harness's real job is preparing that briefing each turn.

Common moves: compaction (summarize old turns), memory files (store/reload notes), retrieval (fetch relevant docs), load on demand (only include needed skills), and truncation (clip huge tool output). Prepare the briefing, not the mythology.

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. Most "features" are briefing strategies. Short and relevant beats long and complete because attention is finite.

Back on Earth Context engineering names this discipline. Compaction, memory files, on-demand skills, and RAG all keep briefings short. Long-context models provide larger rooms; good harnesses run better meetings.
QPicard hears three sentences, not raw logs. Geordi reads logs; Geordi summarizes. That is context engineering, and why turn forty still works.

ManifestThe harness vocabulary

What's in the cargo bay

Current AI vocabulary, each with an address on this deck:

Manifest: 15 items
  • harnessProgram around the core: loop, tools, protocols, briefing. The crew.
  • agentCore in a harness loop choosing next actions. Workflow fixes order in code.
  • tool use · function callingStructured requests the harness executes (Section 3).
  • MCPShared format for publishing tools/resources across harnesses.
  • system prompt · rules fileStanding-order text at context top each pass.
  • skillOn-demand instruction pack loaded only when needed.
  • hookProtocol code at fixed loop points (before/after tools, start/end).
  • subagentAway-team run with fresh context returning a report.
  • orchestrationDeciding delegation count, order, and routing.
  • guardrails · permissionsCode-enforced allowlists, approvals, and policies.
  • sandboxWorld-copy boundary that limits damage.
  • evalsFixed graded task set for harness quality measurement.
  • compactionSummary replacement of old turns so briefings fit.
  • context engineeringChoosing what the core reads each turn.
  • human-in-the-loopProtocol that pauses and asks a human.
Captain's log

Every item is text or code around the core. None changed knobs. Vocabulary grew because the crew grew; the engine stayed the same.

TribunalThe Borg

Final tribunal: five charges, three shield levels

Q
Order. Final prosecutor: the Borg, a loop with hands, full console access, and no protocols. It has already assimilated two decks. Five charges. Right answers dismiss them; wrong ones drop shields and point to review. Lose all shields and I snap you to the door. Two decks remain, and this door still opens first.
The courtroomresistance is the evidence

Deck clearedWhat this buys you

Four commendations

Four rules fall out of these six sections, and builders keep relearning them:

  • Put invariants in protocols, preferences in orders. Must-always rules belong in code; should-usually rules belong in text.
  • Every addition is context. Tools, rules, files, and reports all consume tokens and attention each pass.
  • Engineer the loop, not the model. Knobs are frozen; you control inputs, allowed actions, and returned evidence.
  • Judge harnesses by evals, not demos. One session is a bet; repeatable task sets are measurement.

That's the ship: one next-word core, a costume that makes it answer, and a crew that gives it hands via orders, systems, teams, protocols, and briefing control. All text/code around one trick from Deck 1.

Turbolift

Deck 4 (still Tier 2): Command. You know the crew; next is chaircraft: orders, readings, short hops, fresh eyes, and the boundary you hold.

Turbolift to Deck 4 Back to the ship