
The theory and practice of autonomous AI: from goal-directed reasoning and planning to multi-agent coordination and real-world deployment.
An agent is a system that perceives its environment, decides what to do, acts, and learns from the outcome. That loop runs whether the policy is a planning algorithm, a learned reward function, or a language model. Where Building Language AI asks how models work, this book asks what they do: pursue goals, use tools, collaborate with other agents, and operate autonomously over long horizons. The treatment is complete: decision theory and classical planning first (the mathematics every agent is built on), then reinforcement learning and deep RL (agents that improve from reward alone), then LLM-powered agents and agentic RAG, and finally multi-agent systems, embodied deployment, safety, and governance. Each idea is built from first principles and shown in production code.
Each part stands on the one before it; together they span the full spectrum from a single reactive loop to autonomous organizations.
The conceptual and mathematical bedrock: what agents are, how they perceive and act, how they represent preferences as utility, how they plan toward goals, and how they reason with knowledge and uncertainty.
7 chapters IIAgents that improve from experience: Markov decision processes, tabular and deep reinforcement learning, model-based agents, hierarchical control, memory systems, and lifelong and meta-learning.
9 chapters IIILanguage models as policies: prompt engineering, reasoning via chain-of-thought and extended thinking, tool use and MCP, memory-augmented and agentic RAG, autonomous task agents, computer use, and self-improvement.
11 chapters IVAgents working together and at scale: multi-agent systems, MARL, swarm intelligence, software engineering agents, research agents, observability, cost engineering, embodied agents, safety, and governance.
12 chaptersFive habits, kept in every chapter from the first agent loop to the last autonomous system.
Every chapter builds complete, runnable systems (a grid-world agent, a PPO policy, a multi-tool LLM agent end to end), never isolated snippets.
After each from-scratch build, a shortcut callout shows the same task in a few lines of LangGraph, Stable-Baselines3, or the Anthropic SDK, and names exactly what the library handles for you.
Pitfalls, math asides, benchmark tables, and cross-references are typeset as distinct boxes, so you can read deep or skim fast and never miss a trap.
Each chapter closes with hands-on exercises that extend its worked pipelines, from quick checks to small projects you can put in a portfolio.
The utility function becomes the reward signal, the search tree becomes chain-of-thought, the knowledge base becomes agentic RAG. One story, told twice.
Building Agentic AI is one of nine connected books, each a deep, build-it-yourself guide to a major field of AI.
Hands-On AI Science is a series of in-depth guides to the major fields of artificial intelligence. Every book goes deep into the theory, models, and internals, covering the classical foundations and the most recent ideas, then shows you how to build each one in Python with the modern libraries and tools that get the job done. The writing stays plain and light (illustrations, analogies, mental models, worked examples, and a little fun) without trading away rigor or coverage. Each volume is self-contained and complete enough to anchor a full course on its subject.
From Goals to Autonomous Systems.
You are hereRead the full About the Hands-On AI Science Series note.