Skip to content

The Course

Eighteen lessons in nine parts, from how an agent works to running a harness in production. Each lesson tells you up front what you will learn, then ends with questions to check yourself, a hands-on exercise and the primary sources worth reading next.

Reading takes about 14 hours. With all eleven projects, plan on 30 to 40 hours.

Learning path: nine parts from foundations to production, each with its lessons and projects Learning path: nine parts from foundations to production, each with its lessons and projects

Part 1: Foundations

  1. What Harness Engineering Is · 35 min · try the offline harnesslab demo
  2. How an AI Agent Works · 40 min · project: build an agent loop
  3. From Prompt Engineering to Harness Engineering · 25 min

Part 2: Guidance

  1. Instructions and AGENTS.md · 40 min · AGENTS.md template
  2. Context Engineering for Harnesses · 45 min

Part 3: Capability

  1. Tools, MCP and Agent Skills · 50 min · project: tool design

Part 4: Boundaries

  1. Sandboxes, Permissions and Security · 60 min · project: permissions and a sandbox

Part 5: Continuity

  1. State, Memory and Long-Running Work · 50 min · project: long-running state

Part 6: Checking and Visibility

  1. Guardrails, Tests and Evals · 60 min · project: an eval kit
  2. Logs, Traces and Observability · 45 min · project: traces and diagnosis

Part 7: Correction

  1. Feedback, Verification and the Steering Loop · 50 min · project: guides and sensors

Part 8: Control Flow

  1. Loop Engineering · 50 min · project: loop controls
  2. Graphs and Multi-Agent Systems · 60 min · project: a graph workflow

Part 9: Putting It Together

  1. Build a Complete Harness · 75 min · project: the capstone
  2. Diagnosing Agent Failures · 50 min · failure diagnosis table
  3. Harness Engineering in Production · 60 min · production checklist
  4. Harnesses Beyond Coding · 40 min · project: a support agent harness
  5. Case Studies from Real Teams · 45 min

Three ways through

I use Claude Code, Codex or Cursor every day and want better results this week. Read lessons 1, 4, 7, 11 and 15. Write a short AGENTS.md from the template, turn on your agent's sandbox, add one lint rule whose message explains the fix, and use the failure table the next time the agent goes wrong.

I build agents and want to understand every layer. Go in order. Do every project. By Project 10 you will have built, tested and ablated a complete harness.

I lead a team adopting agents. Read lessons 1, 3, 9, 13, 15 and 16, then the harness checklist. The ablation in Project 10 is a good team exercise.

Setup

You need Python 3.10 or newer. Nothing else is required for the lessons, the demo or the projects.

git clone https://github.com/AbhishekAshtekarDev/harness-engineering.git
cd harness-engineering
python -m pip install -e "harnesslab[dev]"
cd harnesslab && python -m harnesslab demo

Every project runs offline with a scripted model, so you can see exact harness behavior without an API key. To use a real model, install anthropic or openai, set ANTHROPIC_API_KEY or OPENAI_API_KEY, and set HARNESSLAB_MODEL to a current model name. OPENAI_BASE_URL points the OpenAI adapter at any compatible server, including local ones.

How each project works

Each project has an exercise/ folder with the parts you write marked TODO, a solution/ folder, and tests:

cd projects/03-permissions-and-sandbox
python -m pytest -q              # tests your exercise/ code (fails until you finish)
SOLUTION=1 python -m pytest -q   # tests the reference solution

On Windows PowerShell, use $env:SOLUTION=1; python -m pytest -q.