Pphill teaches ai
NewAgents · Claude Code

Build Your Own Harness

Agent harnesses look like magic until you see the four lines at the centre of one. This walks you through the five layers of a real harness — the loop, what it can read, what it can change, how it remembers, and what stops it — explaining each capability as you switch it on. At the end you get a staged build brief to paste into Claude Code or Codex, written so the agent stops and teaches you at every stage instead of dumping a finished repo on you.

Harness generatorRuns in your browser — nothing is uploaded.
Loading tool…

Under the hood

The ideas worth stealing

01

The loop is the easy part

Messages in, tool call out, run it, append the result, repeat until the model stops asking. That is the whole engine, and it fits on one screen. Everything people call "agent framework" is a tool you hand that loop or a rule about when it may fire.

02

Capabilities have dependencies

Editing files without reading them first is how agents overwrite work. Opening PRs without approval gates is how they embarrass you. The generator enforces these chains, so you see which foundations a capability actually rests on before you add it.

03

Guardrails are the real feature

Approval gates, a sandbox, run traces and an eval suite are the layer everyone skips and the one that decides whether you can leave the thing running. The difference between a demo and a tool you trust is almost entirely here.

Try another one