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...

Six practical books on engineering with AI coding agents and the infrastructure around them: agent-assisted development, harnesses, autonomous agents, multi-agent orchestration, MCP tool servers, and running language models on your own hardware.
Bought separately
$179.94
Minimum price
$99.99
$129.99
About the Bundle
This bundle collects the six books of the AI engineering series. Together they cover one connected practice: using coding agents in daily development, understanding the harnesses they run in, building autonomous agents of your own, coordinating several agents as a system, connecting models to real tools through the Model Context Protocol, and running open-weight models on your own hardware. It is about software engineering with language models, not a survey of artificial intelligence as a whole.
AI-Assisted Development is the practical starting point: a working method for using a terminal coding agent on production code, built on git, tests, context files, and a Docker sandbox, with a human-reviewed diff as the gate. Agentic Coding Harnesses, Compared & Explained explains what those tools do underneath. It follows the agent loop turn by turn, takes a harness apart into its components, compares Claude Code, Aider, OpenCode, Goose, and Codex, and builds a minimal harness in Python.
Building Autonomous Coding Agents goes further and builds an unattended agent from primitives in runnable Python, adding planning, durable memory, a validated tool layer, sandboxing, a persistent runner, guardrails, evaluation, and an operational safety layer, and ending in a Build-Verify-Fix capstone daemon. Orchestrating AI Agents covers the next scale: operating several agents through a persistent control plane, with delegation, routing by stakes and privacy, shared memory, MCP as the shared tool layer, work queues, budgets, and failure modes.
The other two books cover the infrastructure underneath. The Model Context Protocol (MCP) in Practice builds secure MCP servers in Python and TypeScript, from the protocol and its primitives through tool design, security, client integration, four reference servers, testing, and deployment. Running Local LLMs on Your Own Hardware covers choosing hardware, models, and quantization, comparing inference engines, serving an OpenAI-compatible API, retrieval, fine-tuning, and benchmarking, so that private and cost-controlled models can sit inside the same workflows.
Reliability and control run through all six books: sandboxing, permission and approval gates, guardrails, audit trails, evaluation, cost governance, and human review where the stakes are high. Readers come away able to work productively with coding agents, choose and configure the right tool, build and contain their own agents, coordinate several of them, expose real systems to models safely, and run models locally when privacy or cost requires it.
The bundle suits developers, tech leads, and platform, DevOps, and AI engineers who already ship software and want a practical grounding in agent-based development. The books complement rather than repeat one another. Where tools change quickly, they treat specific commands and versions as examples to confirm against current documentation.
About the Books
**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.
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.
Terminal coding agents can now read a codebase, plan a change, edit many files, run the tests, and hand you a diff. Used well, they compress hours of mechanical work into minutes; used carelessly, they produce confident, plausible, and wrong changes faster than any human could.
AI-Assisted Development is a practical guide to using them well, for working developers who want to move faster without giving up control of quality, security, or their git history. Its method is simple: the human designs, the agent executes, and a human-reviewed diff is the gate between the two.
Git, tests, context files, and a sandbox are the four backbones that make that safe. The book builds each one, then adds the judgment no tool supplies: what to delegate, what to keep, how to review what comes back, and when to stop a session.
Part I maps the tools and walks through a controlled first session. Part II covers daily practice, from sandboxing and prompting to refactoring, diff review, git micro-commits, and testing. Part III scales the practice to local and cloud models, custom tools, teams, and CI, and closes with the anti-patterns and maintenance habits that keep it healthy.
Because tool names and flags change quickly, the book anchors on durable patterns and treats specific commands as illustrations to adapt.
The Model Context Protocol (MCP) in Practice is a hands-on guide to building custom MCP servers: the programs that let a language model use real tools, read live data, and work with organizational systems through one open protocol instead of one bespoke integration per client. It has sixteen chapters in five parts, follows the real arc of building a server from protocol to production, and is written for engineers who build things. It covers the server side of MCP only, and it does not teach how to write a client or host.
The first part explains what crosses the wire: the JSON-RPC 2.0 message shapes, the stdio and SSE transports, the initialization handshake and capability negotiation, and the three primitives every server is built from, which are tools, resources, and prompt templates. The second part builds the same small server twice, once in Python and once in TypeScript, so readers can separate what belongs to the protocol from what belongs to one SDK. The code uses pinned versions of both SDKs, and fast-moving details are gathered into clearly marked version-sensitive callouts.
The third part is the craft of design and security. It shows how to name and describe tools, write schemas, and shape results so that a model uses them correctly, how to serve live data as bounded resources, and how to package workflows as prompts. It then treats security as defense in depth, with capability minimization, scoped credentials, path and subprocess safety, injection defenses, and dry-run gates, all built on the premise that a model can be steered by the content it reads. The fourth part connects servers to Claude Code, Claude Desktop, Cursor, and Zed, and builds four reference servers: a WordPress content server in Python that can draft but never publish, a GitLab server in TypeScript that previews before it acts, a DevOps server in Python that runs only allowlisted operations, and a project-scoped memory server in Python backed by SQLite.
The final part proves and ships the work. It covers layered testing with the MCP Inspector, pytest, and vitest, protocol probes and stdio integration tests, Docker packaging for both languages, deployment over SSE behind a reverse proxy with authentication and health checks, versioning, and a decision framework for when a server should stay local. The SSE transport it demonstrates is now a legacy option in the SDKs, and the book explains the Streamable HTTP direction. Each chapter includes a hands-on lab, and from the design chapters onward each provides a reusable checklist. The safety helpers and storage layers of the reference servers have tests that were executed, while running each full server against a live system is left to the reader in the labs and the release checklist.
Readers come away able to choose the right primitive for a capability, design tool surfaces a model can use, secure a server against manipulation, connect it to real clients, test it in layers, and decide whether and how to deploy it. It suits backend, platform, DevOps, and AI engineers who are comfortable with HTTP APIs, JSON, and the command line, and it requires no machine-learning background.
Orchestrating AI Agents is a practical, architecture-first guide to operating several AI coding agents as one coordinated system. It has sixteen chapters in four parts, is vendor-neutral by design, and uses a single worked control plane, Hermes, to show how the pieces fit while labeling what is specific to it. It is written for engineers, platform builders, and technical founders who already run more than one agent, and it is not a tutorial for any single tool.
The book starts from a problem and a thesis. Claude Code, Codex, local models, and MCP servers each do something well, but nothing owns persistence, scheduling, cross-project memory, routing, or a capability registry. Because an agent's commands run in a shell and most serious agents offer a headless mode, a persistent control plane can drive any command-line agent as a tool. The book's rule is to orchestrate rather than replace, so the control plane stays a modest coder and becomes an excellent operator.
The middle of the book builds the mechanics. A dated survey reads Claude Code, Codex, Antigravity, Aider, OpenCode, and local models on the axes that matter for routing. The delegation primitive covers briefs, adapters, validated output, write-back, and auth isolation. A routing engine decides by stakes, context size, privacy class, and autonomy among acting directly, delegating, and escalating, under one absolute rule that high stakes reaches a human. Layered memory is shared across harnesses, skills form a capability registry, MCP is the shared tool layer with reads freely granted and writes gated through one seam, and local-first routing is enforced by a model gateway.
The last part is about operating the result. It covers defense-in-depth sandboxing, approval modes and blocklists, scheduling with a lease-based multi-agent work queue, a worked orchestration with a software-release factory and a customer-support fleet as further cases, budgets and spend governance, and a catalogue of failure modes with a discipline of escalation and a clear account of what never to automate. It closes with a maturity arc and an honest ceiling: production, money, and security stay human-reviewed.
Readers come away able to route work by explicit criteria, brief and validate delegated runs, design shared memory that compounds, contain unattended agents, govern their spend, and recover when a standing fleet fails. Tool-specific claims are dated and treated as examples to confirm against current documentation, while the architecture is written to outlast them.
Open-weight models now run well on hardware you already own, whether that is a gaming laptop, a workstation with a single consumer GPU, an Apple Silicon Mac, or a capable CPU with enough memory. Running them yourself buys privacy, a cost that does not grow with usage, offline availability, and control over exactly what you depend on.
Running Local LLMs on Your Own Hardware is a practical, hands-on guide to downloading, running, serving, and maintaining those models. It is built around a durable mental model of local inference: how a model uses memory and compute, why memory capacity and bandwidth matter more than raw processor speed, and how that lets you predict what will fit and how fast it will run.
From there the book reads your hardware, chooses a model and quantization, sets up the environment, compares the major inference engines, and runs and diagnoses a first model. It then covers quantization, prompting and sampling, serving an OpenAI-compatible API, retrieval over your own documents, and fine-tuning with LoRA and QLoRA, before closing with benchmarking, scaling beyond one GPU, and security, privacy, maintenance, and troubleshooting.
Examples target Linux first (Debian and Ubuntu with NVIDIA GPUs), with call-outs for Apple Silicon, AMD, Windows through WSL2, and CPU-only setups. Because tools change quickly, the book teaches the principles behind the commands and treats specific flags and model names as snapshots to adapt.
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.