Leanpub Header

Skip to main content

Agentic Coding: Building Reliable Software with AI Agents

Agentic Coding: Building Reliable Software with AI Agents

AI can already write, test, and ship code on its own — the question is no longer what it can build, but what you can trust. Agentic Coding gives you the engineering discipline behind that judgment call: how to delegate real work to an autonomous agent, verify what it produces, and keep an entire codebase and team accountable once agents are doing the work. Built around a single running example across all 24 chapters, it turns hard-won lessons from the frontier of agentic software engineering into mechanisms you can use tomorrow.

Interested in this book? Show your support by saying what you'd like to pay for it!

$
PDF
EPUB
WEB
APP
About

About

About the Book

AI can already write, and rewrite, an entire feature while you get coffee. That's not the hard part anymore. The hard part is knowing whether to trust what it just did — and building the engineering discipline that lets you find out.

Agentic Coding: Building Reliable Software with AI Agents is a systematic guide to that discipline. It isn't a tutorial for any one tool, and it won't walk you through a particular CLI's flags — those change every few months. Instead, it gives you the mental models and engineering mechanisms that stay useful no matter which coding agent you're driving: how to turn a vague requirement into a task an agent can actually execute and you can actually verify; how to manage a limited context window as your most contested resource; how to decide what an agent may do on its own, what it must escalate, and what it must never touch; and how to keep an entire codebase, a whole team, and a production pipeline governable once agents are doing real work inside them.

The book is built around a simple, recurring worry: agents are eager, confident, and occasionally wrong in ways that look exactly like being right. To make that worry productive rather than paralyzing, the book develops its own working vocabulary — the Four Paradoxes of AI collaborators, Trust Engineering's four pillars of delegation, safety, accountability, and compliance, and evidentiary thinking as the core habit of mind a developer needs once code itself is no longer scarce. These aren't abstractions for their own sake; each one comes with the failure mode it's meant to catch and the concrete mechanism — a Mission Brief, an Autonomy Envelope, a Structured Decision Request, an N-version Exploration — that catches it.

Every mechanism is grounded in IoTFlow, a fictional but fully worked-through IoT platform that runs through all twenty-four chapters. You'll watch the same gateway module get a feature scaffolded, then break in production, then get refactored, then get migrated — so every technique is shown solving a real problem in a real codebase, not floating free as a slide-deck principle.

The book moves from the fundamentals of what an agent is and isn't, through the full working loop of intent, context, tools, and verification, into harder terrain: multi-agent pipelines, codebases built to stay legible to humans and agents alike, delivery and governance at production scale, and the open research questions the field hasn't answered yet. Four appendices — a glossary, a set of engineering templates, a prompt-engineering quick reference, and a full map of the IoTFlow example — turn the book into something you'll keep open on a second monitor, not just read once.

Share this book

Author

About the Author

Kaven Ward

Kaven Ward is a researcher at a technology research center, holding a Ph.D. in Engineering. With extensive experience in communication networks and computer technology, he has worked across wireless systems, network architecture, and emerging information technologies, with particular attention to the design, standardization, and engineering deployment of resilient communication systems. Kaven Wang's research interests include emergency and public safety communications, digital trunking systems, and the integration of terrestrial, satellite, and next-generation wireless networks. He writes with an emphasis on connecting technical principles to real-world engineering practice.

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

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

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

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

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

Write and Publish on Leanpub

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.

Learn more about writing on Leanpub