Week 3 · Foundations

The Runtime — Build a Harness

Make it survive production

⏱ ~6 hours, hands-on🐍 Python / 🔷 TypeScript🛠 You ship: A runtime that runs any agent reliably
What this week is

Week 1 you built an agent. Week 2 you built the discipline around one. This week we build the thing most engineers never see until it bites them: the harness — the runtime layer between your agent loop and the real world.

This is a systems week, not an app week. The agent itself is deliberately boring: a domain-neutral support-triage bot, our crash-test dummy. The harness is the protagonist.

Agent systems are workflow systems. The LLM decides the next semantic step; the harness owns execution. Everything this week hangs off that one split.

The rhythm is the same in every part: name a production failure mode, watch the naive agent fail live, build the one harness capability that fixes it, then re-run and watch it survive.

The walkthrough

Each part adds one capability to the same growing codebase, and each is a runnable checkpoint.

  1. 01The failure modesWatch a naive agent break in the five ways production actually breaks it.
  2. 02Durable statePersist the workflow so a crash mid-tool-call is a resume, not a restart.
  3. 03Sandboxed executionRun model-written code without handing it your machine.
  4. 04Flat memoryKeep context bounded so a long-running agent does not grow without limit.
  5. 05Routing to specialistsLeast-privilege handoffs — each sub-agent gets only the tools it needs.
  6. 06Parallel supervisionRun work concurrently and degrade gracefully when one branch fails.
  7. 07Long-lived approvalPause a workflow for three days waiting on a human, then resume exactly where it stopped.

After this week you can

  • Separate semantic decisions (the model) from execution (the harness)
  • Make an agent crash-recoverable with durable state
  • Sandbox untrusted, model-generated code
  • Support human approval that outlives the process