The twenty lines under every agent — and the truck they can drive.
Same tool that writes my code — running on a Raspberry Pi, driving a toy Cybertruck. How is a robot the same program as a coding assistant?
A kitchen is everything around the cook that turns raw talent into dinner — on time, every night. An agent harness is the same thing around a model: the model can reason, but the harness is what turns reasoning into work you can serve. Swap the chef — the kitchen still ships dinner.
For decades, backend meant three resources — and each earned a management layer. Intelligence is the fourth: metered, it scales and throttles, and it fails in new ways. The harness is how you manage it.
Each layer allocates the resource, hides its failure modes, and hands you a clean interface. The harness is that layer for intelligence.
The model is the smallest piece of the system — and it keeps shrinking. Everything that makes an agent work is the harness around it. Swap the model, and the same harness holds the output steady.
Held constant: the loop. The only thing that changes is the configuration — skills, tools, the system prompt. Same engine, different passes.
Same loop. Different configuration. You'll watch this thesis play out all morning.
We'll build #1 live. #2 is where guardrails and evals live — a loop wrapped around the loop.
The loop is the engine — about twenty lines. The harness is the car: brakes, mirrors, a fuel gauge, seatbelts. We'll build the whole car.
const tools = {
read_file: {
description: "Read a UTF-8 file and return its contents.",
run: ({ path }) => fs.readFileSync(path, "utf8"),
},
write_file: {
description: "Create or overwrite a UTF-8 file.",
run: ({ path, content }) => {
fs.writeFileSync(path, content);
return `wrote ${content.length} bytes to ${path}`;
},
},
};
Two tools. Each is a schema for the model plus a function we run.
async function run(task) {
const messages = [
{ role: "system", content: SYSTEM },
{ role: "user", content: task },
];
for (let step = 0; step < 10; step++) {
const { msg } = await callLLM(messages); //~ think
if (!msg.tool_calls?.length) return msg.content; //~ done
messages.push({ role: "assistant", tool_calls: msg.tool_calls });
for (const tc of msg.tool_calls) { //~ act
const args = JSON.parse(tc.function.arguments);
const result = tools[tc.function.name].run(args);
messages.push({ role: "tool", tool_call_id: tc.id, content: result });
}
}
}
Count the lines. ~20. That's loop #1 from two slides ago — the whole agent loop. Everything else is what makes it survivable.
The model didn't change. Its world got bigger. That's the whole game — you upgrade the harness, not the brain.
run_command: {
description: "Run a shell command.",
run: ({ command }) =>
execSync(command).toString(),
},
The camera is a tool that returns "wall · 30cm" — MiDaS turns one image into a symbol. Same loop, same twenty lines. It runs Sonnet, not the biggest model: a body needs reflexes more than genius.
A software agent believes it turned left and reasons forward on a fiction. A rover that believes it turned left hits a table leg — in front of all of you. Embodiment gives you the verification loop for free. You just can't turn it off.
● built today, ~130 lines · ○ what production adds — every piece bolts onto the same loop
Own the loop. The model is a commodity.