← All Series

SERIES // 5 MODULES · HANDS-ON · BUILD YOUR OWN HARNESS

Harness Engineering.

Build the layer that turns a model into an agent. A language model only takes text in and puts text out — everything that makes it act (edit files, run commands, remember, recover) lives in the harness. This is a five-module, hands-on course that builds that layer from a bare loop to a production-grade harness: the anatomy, tools & the execution environment, context engineering, durability & orchestration, and the internals of real harnesses (pi, Hermes, Claude Code) — with a capstone where you assemble your own pi-style harness. Every module ends with something you build.

5 modules
~25k words
5 you-build labs
live complete


01

The Anatomy of a Harness

Why "just call the API" fails — transactional inference vs a real agent. Dissecting Claude Code, pi, and Hermes layer by layer. Prompt vs context vs harness engineering — precise boundaries. The agent loop from first principles: messages, turns, stop conditions, streaming.


02

Tools & the Execution Environment

Tool schemas as contracts: read, write, edit, bash, search. Streaming tool calls into a terminal UI. Permission gates and approval modes — why Claude Code asks before rm. Sandboxing and the blast-radius problem; code-mode vs tool-mode.


03

Context Engineering Inside the Harness

Context budgets: what goes in every turn, what gets evicted. Compaction and summarization — surviving long sessions without losing the plot. Memory systems: session state, persistent memory files, the CLAUDE.md pattern. System prompts as infrastructure, not prose.


04

Durability, Recovery & Orchestration

Durable execution: checkpointing every model turn and tool call, replay on restart. Self-healing loops: retries, failure classification, resumable sessions. Sub-agents and handoffs — when one context can't hold the job. Supervision and human-in-the-loop: plans, approvals, escalation.


05

Production Harnesses & Capstone

pi internals: extensions, models.json, the minimal-surface philosophy. Hermes internals: a research lab's harness design choices. Claude Code internals: skills, hooks, MCP, sub-agent types. Evaluating a harness — how you know yours actually works.


THE HARNESSES WE READ

  • pi (pi.dev ↗) — a minimal agentic harness: small surface, extensions, any model. The proof that a harness doesn't need to be enormous to be real. Your capstone is built in its spirit.
  • Hermes (Nous Research ↗) — an open agentic harness from a research lab: a different set of design choices for the same problems. We contrast it throughout.
  • Claude Code — the batteries-included harness: skills, hooks, MCP, and typed sub-agents, dissected once you've built each layer yourself.