AI Agents in Action, Second Edition

Intelligent workflows with LLMs, MCP, A2A, and more

Part of In Action
Published by Manning
Distributed by Simon & Schuster

LIST PRICE $43.99

PRICE MAY VARY BY RETAILER

Digital products purchased on SimonandSchuster.com must be read on the Simon & Schuster Books app. Learn more.

Get 25% off with code GIFT26 plus free shipping on orders of $40 or more. Discount on physical products only. Terms apply.

Buy from Other Retailers

About the Book

Get the eBook free when you register your print book at Manning.

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.

What’s new and included in the second edition?

  • A near-total rewrite with new and extensive coverage of the latest agent innovations
  • Agents start to finish—from prompting and planning, to memory and evaluation
  • New chapter! Evaluate agents with LLM-as-judge, test-driven-development, and observable behavior
  • New chapter! Explore the agentic loop, build task-focused agents, and develop long-horizon, goal focused systems
  • New chapter! Metacognition harnesses that structure agent thinking, planning, and learning
  • New chapter! Practical tips and techniques for building AI applications, help desks, and deep research agents
  • New chapter! Voice-driven AI agents, including real-world deployment patterns for multi-agent systems
  • Multi-agent workflows with assembly-flow, orchestration, and collaboration patterns
  • Hands-on with the Model Context Protocol (MCP) to connect agents to tools and servers
  • Hybrid search for Retrieval Augmented Generation (RAG) and practical ways to use memory in agents


With more than 95% rewritten from the first edition, AI Agents in Action is far more than a refresh! You’ll go right from your agent’s first response, to systems that use tools, work together, draw on knowledge, and incorporate feedback. All illustrated with practical examples throughout.

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.

About the Author

Micheal Lanham is a proven software and tech innovator with over 20 years of experience. He has developed a broad range of software applications in areas such as games, graphics, web, desktop, engineering, artificial intelligence, GIS, and machine learning applications for a variety of industries. At the turn of the millennium, Micheal began working with neural networks and evolutionary algorithms in game development.

Series with Books by the Author

Product Details

Resources and Downloads

High Resolution Images

More books from this author: Micheal Lanham

BACK TO TOP