A practical guide to building AI agents, RAG systems and multi-agent workflows. You start with how models read text and finish with a multi-agent system that is tested, secured and deployed.
Instant PDF download · Code from 3 public repositories
why this book
Most tutorials stop when the agent answers one question correctly. Real systems fail in quieter ways. They retrieve the wrong document, repeat a tool call, lose a fact during a handoff, or follow an instruction hidden in a web page.
This book teaches the parts around the model that prevent those failures: the harness, the context, the tools, the stopping rules, the checks and the evals. Every idea is explained in plain English first, then built and tested in code.
after reading, you will be able to
Decide when a task needs an agent and when a fixed workflow is better, then sketch the harness, tools and trust boundaries.
Choose what the model sees at each decision, within a budget, so it has the evidence it needs and nothing that misleads it.
Parse, chunk, search, rerank and cite, then turn the pipeline into agentic RAG that knows when to stop or abstain.
Write tool contracts, MCP servers and Agent Skills that an agent can use reliably, with retries and idempotency.
Delegate, hand off and share state with a graph coordinator, and measure whether the team beats one agent.
Threat-model the system, defend against prompt injection, measure guardrails with evals, ship it to the web, and design agents that can pay safely.
what's inside
Each part builds on the one before it, so you always know why a new idea is needed.
in every chapter
Chapters follow the same rhythm. A real request opens the chapter, a diagram shows the moving parts, and a hands-on exercise ends with a check you can run.
A bound is an execution rule, not a suggestion in a prompt.
build along
Clone the code at the exact version the chapter uses, run the tests, and extend it. Nothing is hidden behind a screenshot.
A local app that answers questions from clinical guidelines with hybrid search, reranking and citation checks, then measures itself with an evaluation set.
An agent that turns a request into tasks, schedules them with plain code, validates every plan and asks for approval before it writes anything.
Six agents research jobs, write cited drafts and pass a two-layer review. Then you secure it against prompt injection and deploy it to the web.
is it for you
about the author
I am a data scientist and AI consultant with more than ten years in tech, from technical writing and database administration to backend development and AI engineering. I hold a Master's in Data Science and founded Aurora Data Strategies, a data and AI consultancy.
I have taught machine learning since 2023 and mentored more than 250 people across different roles. Across my platforms, I explain AI in plain English to more than 300,000 people. This book is how I would teach agents to you in person: slowly, clearly, and with code that runs.
get the book
Secure checkout on Stan · Instant PDF download
questions
Basic familiarity with Python helps. Every concept is explained in plain English before the code, and the first chapter needs only a chat interface.
The ideas work with any model provider. The hands-on chapters use Claude and ChatGPT, MCP, Agent Skills, LangGraph and Python, and the projects can run on free tiers.
A 447-page PDF you can read on any device. The code lives in public GitHub repositories, pinned to the exact version each chapter uses.
One book, three repositories, and a method you can reuse on every agent you build after it.