Harness Engineering 101, a free book on how AI agents work under the hood
Isuru Wijesiri, who built AI copilots at WSO2, has published Harness Engineering 101, a free online book on building AI agents from first principles. Its core idea: an AI model only takes in a list of messages and returns text, and the "harness" is the program that builds and protects that list, so tools, the agent loop, caching, subagents, guardrails and RAG are all fixes to that one loop. Over 16 chapters it grows a roughly 300-line toy agent in plain Python, with appendices on routing between models, cost, retries and rate limits. The code is MIT-licensed and the text is free to share but not to reuse commercially; the author says he wrote the chapters himself and used AI tools to reorder and polish them.
On Hacker News (128 points, 64 comments), the 18 top-level comments lean critical. Four dismiss it as AI-written, one suggesting you build your own harness from older guides instead. Six argue with the brain and body comparison, offering other analogies or objecting to treating models as brains. Two are positive, one saying tuning the harness matters as much as the model. Three share their own harness projects, and three ask other questions, including where to find advice on hardening a harness. No consensus.
Sorted take: The idea is sound and worth an afternoon if you manage people building agents, because most agent bugs are about what goes into the message list; skim the contents page and read the chapters on context, caching and guardrails first.
Why it matters: If your team builds internal agents or buys agent tools, the chapters on context limits, caching and guardrails explain why agents slow down, cost more or go off track, which helps you ask vendors and developers better questions.
GitHub ↗Discussion on Hacker News ↗AI-assisted, reviewed by Sorted AI
▲ 0
0 comments