Skip to Content
AI Agents in Action, Second Edition
book

AI Agents in Action, Second Edition

by Micheal Lanham
June 2026
Intermediate
392 pages
11h 35m
English
Manning Publications

Overview

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

About the Technology


About the Book


What's Inside
  • Autonomous agent design and deployment
  • MCP-based tools, resources, prompts, memory, and server integrations
  • Reasoning and planning patterns including ReAct, Reflexion, Tree-of- Thought, and Sequential Thinking


About the Reader
For intermediate Python programmers. No experience with AI agents and agentic systems required.

About the Author
Micheal Lanham is a software and technology innovator with over 20 years of industry experience. He has authored books on deep learning, including Manning’s Evolutionary Deep Learning.

Quotes
One of the most practical introductions to agent development available today.
- Ajay Prakash, LinkedIn

An outstanding book for beginner practitioners in the field of AI agent development.
- Roger Meli, IT Architect

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI Agents in Action

AI Agents in Action

Micheal Lanham
An Illustrated Guide to AI Agents

An Illustrated Guide to AI Agents

Maarten Grootendorst, Jay Alammar

Publisher Resources

ISBN: 9781633434530Publisher SupportOtherPublisher WebsitePurchase Link