The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

Two comprehensive technical books covering autonomous coding agent architectures, execution workflows, tool integration, orchestration, security, and evaluation. A practical engineering collection for developers building and operating AI-powered coding systems.
Bought separately
$59.98
Minimum price
$34.99
$44.99
About the Bundle
This bundle pairs two books about the system around a coding model. Building Autonomous Coding Agents builds an unattended coding agent from primitives in runnable Python. Agentic Coding Harnesses, Compared & Explained takes apart the harnesses developers already use, including Claude Code, Aider, OpenCode, Goose, and Codex, and explains how they work. Together they cover both sides of the same discipline: understanding and operating the tools that exist, and building a bounded, accountable agent of your own.
Building Autonomous Coding Agents is a cumulative, code-first build. It starts from a minimal five-phase agent loop and adds what unattended operation requires: interchangeable planning strategies, durable SQLite memory with crash recovery, a validated tool-dispatch layer, Docker sandboxing, a systemd-managed runner working a task queue, runtime guardrails, evaluation and observability, multi-agent coordination patterns, local-first model routing, and an operational safety layer of policy-as-code, approval gates, audit trails, and incident response. It ends with a Build-Verify-Fix capstone daemon, integration with an external agent SDK, and operating a small pool of runners.
Agentic Coding Harnesses, Compared & Explained is vendor-neutral and works at the level of mechanisms. It follows the agent loop turn by turn, breaks a harness into its components, and covers the infrastructure harnesses share: the Model Context Protocol, context and cache management, and tool design and safety. It then examines Claude Code and Aider in depth and surveys OpenCode, Goose, and Codex. The practice chapters cover running harnesses on local models, writing project instruction files, choosing a harness per task, weighing cost against capability, and combining several harnesses. The book closes by building a minimal harness in Python.
Readers come away able to explain what a harness does between the model and the codebase, to choose and configure an existing tool for a given task, and to design their own agent with an enforced termination rule, a tool layer that survives malformed model output, sandboxed command execution, durable memory, runtime guardrails, and evaluations that measure whether a change actually helped.
The bundle suits developers, DevOps engineers, tech leads, and AI engineers who already ship software and want to operate coding agents deliberately or build their own. Both books are practical. One is built on working code with a lab in every chapter; the other on worked comparisons and a harness built from scratch. Both treat tool-specific commands as examples to verify against current documentation.
About the Books
Coding agents now run autonomously on your behalf, searching a repository, editing files, running commands and tests, and correcting their own errors. Tools such as Claude Code, Aider, OpenCode, Goose, and Codex look very different on the surface, yet all are described with the same few words.
Agentic Coding Harnesses, Compared & Explained looks underneath. Its premise is that the intelligence lives in the model but the agency lives in the harness, the program that turns the model's requests into real actions and decides when to stop. The book follows the agent loop turn by turn, takes a harness apart into its components, and covers the infrastructure they share: the Model Context Protocol, context and cache management, and tool design and safety.
It then applies that lens to specific tools, with deep dives on Claude Code and Aider and a survey of OpenCode, Goose, and Codex, and moves on to practice: running harnesses on local models, writing project instruction files, choosing a harness per task, weighing cost against capability, and combining several harnesses in one workflow.
The book closes by building a minimal harness in Python against a scripted fake model, and by showing how to evaluate new tools as the ecosystem keeps moving. The chapters are vendor-neutral, use fictional projects, and treat specific commands and settings as conceptual sketches to verify against current documentation.
**Building Autonomous Coding Agents** is a code-first, ground-up guide to the specific engineering discipline that decides whether letting a language model act on a real codebase unsupervised is a responsible decision or a gamble: not a better prompt, but a system around the model that bounds what it can do, verifies what it claims, and stays accountable when it fails. The book exists because the industry conversation about autonomous coding agents has largely stayed at the level of capability claims and anecdote, while the actual question — what architecture makes a given amount of delegated authority safe to grant — has a precise, buildable answer that most treatments skip. This book builds that answer in full, in runnable Python, rather than surveying it in the abstract.
The material progresses as a single cumulative build rather than a tour of unrelated techniques. It opens by defining autonomy itself as delegated authority over action and establishing a four-level spectrum from suggestion to fully unattended operation, then constructs a minimal five-phase agent loop and hardens it, chapter by chapter, with the components real unattended operation requires: three interchangeable planning strategies, a durable SQLite memory that survives a mid-run crash, a validated tool-dispatch layer that turns model mistakes into recoverable data instead of crashes, a Docker sandbox that contains the blast radius of a wrong command, a persistent systemd-managed runner that works a task queue overnight, workspace briefing that stops the agent from rediscovering the same facts on every task, seven concrete runtime guardrails for seven named failure patterns, an evaluation and observability stack that replaces anecdote with measurement, three patterns for coordinating multiple agents when — and only when — that is actually justified, local-first model serving with a privacy-enforced routing policy, and a full operational safety layer of policy-as-code, approval gates, human override, audit trails, and incident response. Everything converges in a capstone Build-Verify-Fix daemon that assembles all of it into one bounded, reviewable system, and the book closes by showing how that same system is wrapped around an external agent SDK without surrendering its boundaries, and how it is operated as a small pool once a single runner is no longer enough.
Readers finish with concrete, transferable capabilities rather than familiarity with one framework: the ability to design a control loop with explicit, runtime-enforced termination; to build a tool layer that survives argument hallucination and malformed input without crashing; to contain command execution in a real sandbox and prove the containment holds with tests against actual Docker; to give an unattended system durable memory, crash recovery, and an audit trail an operator can trust more than the agent's own self-report; to detect and bound the specific ways autonomous agents fail rather than hoping they won't; to measure whether a change to an agent's prompt, model, or planner actually helped instead of guessing; and to reason clearly about when a second agent, a local model, or an external SDK earns its added complexity rather than merely sounding more advanced. The material is thoroughly hands-on: every chapter builds working code, includes a lab that exercises it against real failure conditions (a simulated crash, a path-traversal attempt, a deliberately induced infinite loop, a policy violation), and closes with a chapter summary, an outcomes checklist, and interview-style questions that test the underlying reasoning, not just recall.
This is a book for engineers who already ship software and are deciding how much authority to hand a language model over their own codebase — senior developers building internal tooling, teams evaluating or building agent platforms, and anyone who has to defend an autonomy decision to a colleague or a security review rather than simply hope it works out. It assumes solid Python and ordinary familiarity with tests, containers, and running a service, but assumes no prior experience building agents specifically. Readers looking for a survey of agent products, a promise of unsupervised production deployment, or a shortcut past the engineering will not find it here; readers willing to build the real system, one enforced boundary at a time, will finish with an autonomous coding agent whose limits they can state precisely — because they built every one of those limits themselves.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.