"Great contents, broad coverage, fun exercises. This book has it all.”
—Saurabh Sawant, Microsoft
AI Agents in Action, Second Edition is a substantial revision and update of the first edition. It is a practical and comprehensive guide to building AI agents—not just understanding what they are, but designing, implementing, evaluating, and deploying them. Its strength is in the way it combines conceptual clarity with working code examples, so readers build progressively rather than absorb isolated ideas. The examples form a continuous learning path, moving from a minimal agent to more capable, tool-using, multi-agent, and deployable systems. Each step adds a new skill while reinforcing what came before.
The book begins by giving readers a usable mental model for agent design. Its central organizing idea is the five functional layers: persona, actions and tools, reasoning and planning, knowledge and memory, and evaluation and feedback. This framework helps readers understand where an agent’s behavior comes from and how to diagnose weaknesses. Rather than randomly adding prompts, tools, or memory, readers learn to ask which layer needs improvement. This is especially valuable because the model is not tied to one vendor or framework; it remains useful even as APIs and tools continue to change.
From there, the book moves into the practical building blocks of agents: LLMs, prompting, typed outputs, tracing, tool use, and the OpenAI Agents SDK. Typed outputs reduce brittle text parsing. Tracing exposes what the agent is doing. Tool integration gives agents the ability to act rather than merely respond. The cumulative benefit is that readers learn to build agents that are more predictable, inspectable, and maintainable.
A highlight is the treatment of Model Context Protocol. Readers liked the book’s “USB-C” analogy, because it explains MCP as a standard connector between agents and external capabilities. The book shows how MCP can flatten “a mess of bespoke integrations” into cleaner, swappable components, helping developers build agents that are modular instead of tangled.
The book also covers multi-agent architectures, reasoning patterns, planning strategies, RAG, memory, evaluation, feedback, observability, and deployment. Each topic is tied to a practical benefit: multi-agent patterns help divide complex work; reasoning and planning help agents handle multi-step tasks; RAG and memory let agents use external and retained knowledge; evaluation and feedback help make them safer and more reliable.
Physically, this is a substantial but focused book covering 392 pages across 11 chapters. Its tables and figures are a valuable part of the learning experience. While building, readers will want to return to the easy-to-use tables summarizing complex trade-offs.
AI Agents in Action shows developers how to build agents they can ship, trust, and maintain.
In AI Agents in Action, you’ll learn how to build production-ready assistants, multi-agent systems, and behavioral agents. You’ll master the essential parts of an agent, including retrieval-augmented knowledge and memory, while you create multi-agent applications that can use software tools, plan tasks autonomously, and learn from experience. As you explore the many interesting examples, you’ll work with state-of-the-art tools like OpenAI Assistants API, GPT Nexus, LangChain, Prompt Flow, AutoGen, and CrewAI.
Evolutionary Deep Learning introduces evolutionary computation (EC) and gives you a toolbox of techniques you can apply throughout the deep learning pipeline. Discover genetic algorithms and EC approaches to network topology, generative modeling, reinforcement learning, and more! Interactive Colab notebooks give you an opportunity to experiment as you explore.