<div align=“center”>
Harness engineering — from scratch
Build a coding agent’s harness by hand, one piece at a time. Then run the same piece through the real tools. 10 phases, 41 lessons.
</div>
A harness is the system around the model: the loop, tools, context, memory, permissions, subagents and evals. Here you build each piece yourself with the standard library. Then each Use It section maps the piece to how Claude Code and the SDKs do it.
How it works
Each lesson has five beats: Motto → Problem → Concept → Build It → Use It. Every code file runs offline and ends with assertions, so a broken piece fails loudly. Each phase ends with a short Test yourself.
Start here
- Find your level: run
/find-your-levelfor a short placement quiz. Or open the Roadmap. - Read the spine first: The ten principles.
- First lesson: The agent loop.
- The finish line: Capstone.
Run the code
python3 harness-engineering/phases/01-foundations-and-the-loop/03-the-agent-loop/code/agent_loop.py
python3 harness-engineering/phases/10-capstone/01-assemble-the-agent/code/test_agent.py
Connects to other tracks
You build the harness here. These tracks cover the same problems from other angles.
- What is an agent? — the conceptual view of the loop.
- Tool calling — tool contracts and MCP at product level.
- Memory & context — memory design behind phase 3.
- Prompt engineering — prompt craft behind phase 4.
- AI security & guardrails — the threat model behind phase 6.
- Evaluation & observability — the eval case behind phase 9.
- Cost optimization — the cost layer above tracing.
- Agentic workflows — orchestration patterns beyond phase 7.
- RAG & vector databases — retrieval beyond the repo map.
- Running an agent in production — limits, gates and the kill switch.
<div align=“center”><sub>Educational content. Use it, fork it, teach from it.</sub></div>
