The gap between prototype and production is where most AI teams stumble. Written by the co-creator of a popular agent framework, Patterns for Building AI Agents captures practical strategies emerging in the year of Agent design patterns: Evolving architectures, creating dynamic agents, and building human-in-the-loop workflowsContext engineering: Parallelization, context compression, and avoiding failure modesEval workflows: Creating eval suites, cross-referencing failure modes with metrics, and leveraging domain expertsSecurity fundamentals: Preventing prompt injection, sandboxing code execution, and implementing agent access control
In this sequel, Sam Bhagwat goes into a much more in-dept analysis of the current state of AI Agents, going past classification but instead focusing on how to build robust and well-tested agents. From managing the agent's context, evaluating them, and keeping your information around them secure, this book focuses more on best-pratices, as opposed to its predecessor.
As Sam claims in the introduction, this book "should be on your desk until its contents are imprinted in your mind." For devs building AI agents like myself, a lot of the information in this book ought to stay relevant throughout the life of this technology, and it will become imperative to master some of these techniques, especially those around security and testing, in order to create agents that are good pieces of software.
Nonetheless, the reduced amount of propagando on Sam's own platform is perhaps the most welcoming part of this sequel--Looking forward for that third volume that is promised early in the book!
This book's from October 2025, so it might be a bit old in the agents era. However the concepts covered are still applicable. those coming from traditional software crafting will recognise some of these "patterns" as they are not so different yet worth reading about them and how they may apply to Agent development.
At the same time, this book can be helpful for non engineers too, specially PM looking for or currently working on AI products.