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

From one prompt to an agent you can trust with real tickets. One project across two visual books: Foundations, then Agents.
Bought separately
$48.00
Minimum price
$24.99
$34.99
About the Bundle
Start with one prompt. Finish with an agent you'd trust on real tickets.
These two books follow one project from beginning to end: a support assistant for Northwind Goods, a fictional online store. Volume 1 builds it. Volume 2 makes it reliable. Get both and you never have to restart with a new example, a new codebase or a new set of terms.
In Volume 1: Foundations (24 chapters), a single prompt answering "Can I get a refund for order #1234?" grows into a working system that:
In Volume 2: Agents, that assistant gets the harness it needs for real work:
Still to come in Volume 2: agentic RAG, MCP, tool trust, multi-agent systems, failure engineering, evaluation and reliability.
Every idea is a named mental model drawn as a doodle, with a plain definition, a failure you can trigger and the fix. Every chapter has short Python examples that run on a scripted stand-in model, so they cost nothing to try.
Bought separately, each book has a $14.99 minimum and a $24 suggested price ($29.98 minimum, $48 suggested for both). The bundle is $24.99 minimum and $34.99 suggested.
Volume 1 is about 90% complete: all 24 chapters are in, and the explainer videos are still to come. Volume 2 is in early access, with 10 of 17 planned chapters written. You buy once and get every new chapter and revision of both books free as it lands.
Backend and full-stack developers, data engineers who've been asked to "add AI", and technical founders who need LLM features that hold up after the demo. You need to read Python. You don't need a machine learning background.
About the Books
You got the demo working. Now it has to work on Monday. AI Engineering Visualized is for developers who have to ship features that call a language model. A model is one box; a product is the whole diagram around it. This book draws that diagram, box by box, as hand-drawn doodles you can remember and reuse when you design or debug. Every idea is a named mental model, such as The Context Suitcase, The Citation Gate, The Golden Set or The Trojan Ticket, with a picture, a plain definition, a failure you can trigger and the fix. One assistant, built chapter by chapter. You build a support assistant for Northwind Goods, a fictional online store. It starts as one prompt answering "Can I get a refund for order #1234?" and grows into a system that:
Real code, no API key. Every chapter has short Python examples from the free companion repository (MIT licence, Python standard library only) and an exercise with a tested solution. The examples run on a scripted stand-in model, so they cost nothing; swap in your provider with one function when you are ready. Who it's for: backend and full-stack developers, data engineers asked to "add AI", and technical founders. You need to read Python. You do not need a machine learning background. Who it's not for: readers who want to train models from scratch, or a catalogue of today's model prices and rankings. Prices and model names change too fast; the book shows you how to measure instead. Early access (about 90% complete). All 24 chapters of Volume 1 are in this edition, fully illustrated. Each chapter's explainer video (QR code and short link in the book) is coming. Buy once and get every update free as the videos land.
Table of contents
Part I: The First Call
Part II: Making It Dependable
Part III: Giving It Knowledge (RAG)
Part IV: Giving It Hands (Agents)
Part V: Ship It
Plus: About This Book (with how to use the code), How to Read the Doodles, How to Use the Videos, a Further Reading appendix, a Glossary and a Mental-Model Index.
Your agent worked in the demo. Then it refunded the wrong order, waited forever on a courier, or told a customer "your refund has been processed" when no payment ever went through.
AI Engineering Visualized, Volume 2: Agents is about everything around the model that turns its proposals into safe, finished work. The book calls that the agent harness: the loop, the tool registry, the checks, the state store, the approvals, the memory and the limits. The model is a part you can swap. The harness is what you test, version and ship.
One assistant, carried forward. Volume 1 ended with a support assistant for Northwind Goods, a fictional online store. Volume 2 picks it up and makes it an agent you could trust with real tickets: refunds, damaged items, late deliveries, address changes. Each chapter builds one part of the harness, shows a failure you can trigger, and fixes it.
Visual first. Every idea is a named mental model, such as The Agent Harness, The Identity Chain, Blast Radius, One Operation, One Receipt, The Waiting Ticket or Every Stop Has a Reason, drawn as a doodle with a plain definition next to it.
Real code. Each chapter has short Python examples ("Hands on Keys") and runs on a scripted stand-in model by default, so it costs nothing. Chapters also report what happened when the same code ran against a real local model (llama3.2 through Ollama), including the bugs those runs exposed and how the harness was changed to catch them.
Done (in this edition):
Coming (planned; titles may change):
11. Agentic RAG: Retrieval the Agent Chooses
12. MCP: Hosts, Clients, Servers and Discovery
13. Tool Trust: Credentials, Allow-Lists and Untrusted Output
14. Multi-Agent Systems: Handoffs, Coordination and Trade-offs
15. Agent Failure Engineering: Loops, Cascades and Side Effects
16. Agent Evaluation: Outcomes and Trajectories
17. Agent Reliability: Repeat Runs, Scorecards and Gates
Chapters 1-3 are in the free sample.
Developers who have a working LLM feature or a basic agent loop and now need it to behave on real tasks: backend and full-stack engineers, data engineers, and technical founders. You need to read Python. It helps to have read Volume 1 (especially its agent chapters), but the ideas it relies on are recapped where they are used.
This book is in early access: 10 of 17 planned chapters are written (about 59%). Buy once and get every new chapter and revision free as it lands.
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.