Share E-Book

Agentic Architectural Patterns for Building Multi-Agent Systems (Ali Arsanjani, Juan Pablo Bustos)(Z-Library)

Author

,

Artificial Intelligence
Language English

Agentic Architectural Patterns for Building Multi-Agent Systems - 2026 Proven design patterns and practices for GenAI, agents, RAG, LLMOps, and enterprise-scale AI systems. This book will guide you through a comprehensive pattern language for designing and building agentic systems, and it will also cover practical recipes on integrating and implementing these patterns with tools such as Google ADK, CrewAI, and LangGraph. Most of the agent configurations described in this book are illustrated using Google’s Gemini models and Python, but you can apply these architectural patterns to other LLMs and frameworks. This book is for software architects, senior developers, AI engineers, and technical leaders looking to move beyond simple chatbot prototypes and build robust, production-grade agentic systems. Experience with Python programming, basic machine learning concepts, and a familiarity with API-based development is required to get the most out of this agentic AI book.

Format PDF
Size 37.0 MB
8
Views
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
Agentic Architectural Patterns for Building Multi-Agent Systems Proven design patterns and practices for GenAI, agents, RAG, LLMOps, and enterprise-scale AI systems Dr. Ali Arsanjani Juan Pablo Bustos
Page 3
Agentic Architectural Patterns for Building Multi-Agent Systems Copyright © 2026 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. This book was written by the authors. Generative AI tools were used only to assist with phrasing and diagram drafts, and all technical content and code were created, verified, and tested by the authors and Packt’s editorial team. Packt does not accept AI-generated content that replaces expert authorship. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Portfolio Director: Gebin George Relationship Lead: Ali Abidi Project Manager: Prajakta Naik Content Engineer: Mark D'Souza Technical Editor: Sumant Jadhav Copy Editor: Safis Editing Indexer: Pratik Shirodkar Proofreader: Safis Editing Production Designer: Prashant Ghare Growth Lead: Kunal Sawant First published: January 2026 Production reference: 1220126 Published by Packt Publishing Ltd. Grosvenor House 11 St Paul's Square Birmingham B3 1RB, UK. ISBN 978-1-80602-957-0 www.packtpub.com
Page 4
I would like to dedicate this book to my family, who inspire me – Dr. Ali Arsanjani I would like to dedicate this book to my wife, Cinthia, and my children, Penny and Andrew—you are my motivation – Juan Pablo Bustos
Page 5
Foreword The initial phase of generative AI demonstrated the remarkable ability of models to synthesize information and generate content. For enterprises, however, the true potential of this technology lies not just in its capacity to converse, but in its ability to act. We are now shifting from systems that function as knowledgeable assistants to agentic systems capable of executing complex workflows and driving tangible business outcomes. Moving from "thinking" to "acting" introduces new requirements for reliability, security, and governance. Organizations must be able to trust that agents will operate within strict compliance boundaries, adhere to safety protocols, and perform consistently at scale. In Agentic Architectural Patterns for Building Multi-Agent Systems, Dr. Ali Arsanjani and Juan Pablo Bustos address these challenges with the engineering rigor required for enterprise deployment. This book bridges the gap between theoretical capability and practical implementation, focusing on the architectural discipline needed to build durable, production-grade systems. The authors present a structured approach to managing the inherent complexity of multi-agent environments by introducing repeatable design and architectural patterns—such as those for robustness, fault tolerance, instruction fidelity, and compliance monitoring. The frameworks outlined provide leaders with a clear roadmap to assess organizational readiness and guide strategic investments, and they serve as a valuable guide for organizations seeking to integrate agentic AI into their core operations. As we enter this new phase of AI-powered digital transformation, success will be defined by the ability to architect systems that are not only intelligent but also accountable and secure. This book offers a practical blueprint for that journey. Thomas Kurian CEO, Google Cloud
Page 6
Contributors About the authors Dr. Ali Arsanjani is a pre-eminent technical executive who bridges architectural rigor and large-scale organizational strategy with industrial-scale execution. Widely recognized as the "father of SOA", he has led transformational initiatives across multiple organizations. He currently serves as Director of Applied AI Engineering at Google Cloud, where he leads the GenAI Blackbelts, a center of excellence that bridges research, forward-deployed engineering, and enterprise implementation. In this role, he drives strategic co-engineering programs with Google’s most critical customers and partners, accelerating enterprise adoption of generative AI and agentic AI. With executive roots as Head of Machine Learning at AWS and CTO for Analytics at IBM, Dr. Arsanjani has managed global teams of more than 6,000 practitioners. An IBM Master Inventor, his patent portfolio includes foundational contributions to service decomposition and context-aware routing. With executive roots as Head of ML at AWS and CTO for Analytics at IBM, Dr. Arsanjani has managed global teams of over 6,000 practitioners. An IBM Master Inventor, his patent portfolio includes foundational contributions to service decomposition and context-aware routing. Today, he pioneers generative AI and agentic AI, introducing best-practices and protocols (e.g., A2A) to ensure autonomous systems remain transparent, auditable, and grounded in ethical governance. A dedicated educator, he has impacted thousands of students as an Adjunct Professor at Maharishi International University, the University of California, San Diego, and San José State University. His scholarly work, cited more than 4,800 times, spans enterprise architecture, distributed systems, and neuro-machine interaction. Dr. Arsanjani remains a leading force in synthesizing deep technical mastery with the strategic vision required to navigate the Agentic Age. I would like to extend my deepest gratitude to my grandparents for their nurturing guidance, love, and wisdom; to my father; to my mother for being a role model for so many, and for giving me the motivation to excel; and to my wife and son, my companions on the path to spiritual evolution and tireless self-sacrifice.
Page 7
Juan Pablo Bustos is a forward-thinking technology leader at the forefront of the generative AI revolution. With a distinguished background at industry giants including Google, Stripe, and Amazon Web Services, Juan specializes in operationalizing Artificial Intelligence for the enterprise. Currently at Google, he serves as a strategic partner to Fortune 50 corporations and global institutions, guiding them through the complex lifecycle of agentic AI adoption—from identifying high-impact use cases to deploying multi-agent systems at scale. Juan possesses the unique ability to zoom in and out of complex challenges, seamlessly translating high-level business strategy into rigorous technical architecture. He is passionate about empowering organizations to move beyond experimentation and deliver transformative value through cutting-edge technology. Dedicated to Cinthia, Penny, and Andrew. You are my motivation. Writing this book with Dr. Ali Arsanjani has been a highlight of my career; thank you, Ali, for the partnership. And to the GenAI tools—Gemini, Claude, and ChatGPT—that helped us iterate faster and dream bigger.
Page 8
About the reviewers Reagan Rosario is currently a Senior Worldwide Generative AI Specialist at AWS. He is widely recognized for transforming how global enterprises modernize legacy systems through workflow automation, applied AI, and cloud-native architectures. His work spans AI systems that have driven engagement increases of up to 63% through personalization; workflow engines achieving 99.97% accuracy via self-learning decision models; serverless batch-processing architectures that reduced costs by 60%; and the creation of cloud migration methodologies that are now adopted as industry standards. His widely referenced technical publications have also helped shape the evolution of enterprise AI and cloud architectures. Ashok Singamaneni is a principal data engineer and open source innovator recognized for advancing large-scale data platforms, AI-assisted engineering, and distributed systems. He is the co-creator of Brickflow and Spark Expectations, two widely adopted frameworks with more than thirteen million downloads that modernize orchestration and data quality for Lakehouse teams. Ashok has presented at the Databricks AI Summit and has appeared on The Data Engineering Show podcast. He is known for mentoring engineers, shaping platform strategy, and delivering reliable, scalable data systems.
Page 9
Join our Discord and Reddit space You’re not the only one navigating fragmented tools, constant updates, and unclear best practices. Join a growing community of professionals exchanging insights that don’t make it into documentation. Stay informed with updates, discussions, and behind- the-scenes insights from our authors. Join our Discord space at https://packt.link/z8ivB or scan the QR code below: Connect with peers, share ideas, and discuss real- world GenAI challenges. Follow us on Reddit at https://packt.link/0rExL or scan the QR code below:
Page 10
Table of Contents Preface xxix Free Benefits with Your Book.......................................................................................................... xxxiv Part 1: Foundations and Core Agent Concepts 1 Chapter 1: GenAI in the Enterprise: Landscape, Maturity, and Agent Focus 3 The transformative potential of GenAI ................................................................................................ 4 Overview of business applications ...................................................................................................... 7 Horizontal applications (cross-functional use cases) • 7 Vertical or domain-specific applications • 8 Introducing agentic AI systems ........................................................................................................... 9 The anatomy of agentic AI ................................................................................................................. 10 Core components • 11 Agent anatomy • 11 Data stores and environment context • 12 Key architectural features • 13 The GenAI Maturity Model: a path to agentic systems ....................................................................... 14 The new agentic stack ....................................................................................................................... 18 Enabling agent communication: from tools to collaboration • 18 Agent internals (common to A and B for simplicity) • 19 The MCP server • 20 The agent server • 20 Challenges hindering production-grade GenAI ................................................................................. 20 Summary ........................................................................................................................................... 23 Chapter 2: Agent-Ready LLMs: Selection, Deployment, and Adaptation 25 Role of LLMs in agentic systems ........................................................................................................ 26 Model selection: choosing the right foundation ................................................................................ 30 Context window size • 32 Model size and specialization for agents • 33 Native support for tool use and function calling • 35 Model robustness, reliability, and safety • 37 Adaptability and fine-tuning potential • 38
Page 11
Other key selection considerations • 40 Deployment and performance optimization for agents ..................................................................... 42 Serving architectures for agentic LLMs • 43 Cloud-hosted APIs • 43 Self-hosted models • 43 Edge deployment • 44 Performance optimization strategies • 46 Latency reduction • 46 Throughput maximization • 46 Cost optimization • 47 Optimizing for tool interaction • 47 Security considerations in LLM deployment for agents • 48 AgentOps: managing LLMs in agentic systems .................................................................................. 49 Summary ........................................................................................................................................... 54 Chapter 3: The Spectrum of LLM Adaptation for Agents: RAG to Fine-tuning 57 From generic LLMs to specialized agents .......................................................................................... 59 Another maturity model for agentic AI • 60 The granularity of agents • 63 A hierarchical agentic architecture for business process automation ................................................ 63 The core components: agents and their capabilities • 65 The hierarchical structure: orchestrators and specialists • 66 Governance and observability via callbacks • 67 Contextual enhancement: stage 1, enhancement with RAG ............................................................... 68 RAG-powered customer support agent • 69 Financial analyst agent leveraging RAG for timely market insights • 71 Compliance agent ensuring adherence with RAG in transaction monitoring • 74 Analyzing the scenarios • 78 Fine-tuning for agentic capabilities .................................................................................................. 79 Domain specialization • 79 The spectrum of tuning: parameter-efficient fine-tuning to full fine-tuning • 80 In-context learning for agent adaptation .......................................................................................... 83 End-to-end example: Product feedback analyzer agent with ICL • 85 Grounding the model output ............................................................................................................. 87 Summary .......................................................................................................................................... 90 Get This Book's PDF Version and Exclusive Extras ............................................................................. 92 Part 2: Agentic AI: Architecture and Design Patterns 93 Table of Contents x
Page 12
Chapter 4: Agentic AI Architecture: Components and Interactions 95 Defining an agent: core concepts and capabilities ............................................................................. 96 LLMs • 97 Automated workflows • 98 AI agents • 98 The anatomy of an agent ................................................................................................................... 99 Case study: Travel Planning Agent • 102 Case study: Agentic Loan Processing System • 103 Illustrative flow: loan application lifecycle • 107 Multi-agent coordination via A2A • 107 Data stores and environment context for agents ............................................................................. 108 Agent interaction models and key features ........................................................................................ 111 Architectural features • 111 Agent interaction models • 112 Technical considerations for agentic architectures .......................................................................... 115 Summary .......................................................................................................................................... 116 Chapter 5: Multi-Agent Coordination Patterns 119 A strategic guide to implementing coordination patterns ............................................................... 120 Multi-agent systems: foundational coordination (Level 4) • 122 Advanced multi-agent coordination and self-correction (Levels 5–6) • 123 The Agent Router pattern (intent-based routing) ........................................................................... 124 Context • 124 Problem • 125 Solution • 125 Example: Routing a compliance request • 125 Example implementation • 126 Consequences • 128 Implementation guidance • 128 Task Delegation Frameworks .......................................................................................................... 129 Supervisor Architecture (centralized orchestration) • 129 Context • 129 Problem • 129 Solution • 130 Example: Centralized loan processing • 130 Example implementation • 131 Consequences • 132 xi Table of Contents
Page 13
Implementation guidance • 132 Swarm Architecture (emergent decentralized coordination) • 133 Context • 133 Problem • 133 Solution • 133 Example: Decentralized content creation • 133 Example implementation • 134 Consequences • 135 Implementation guidance • 135 Agent Composition Topologies ......................................................................................................... 136 Blackboard Knowledge Hub • 137 Context • 137 Problem • 137 Solution • 137 Example: Collaborative medical diagnosis • 137 Example implementation • 138 Consequences • 139 Implementation guidance • 140 Contract-Net Marketplace (Mediator + Bids) • 140 Context • 140 Problem • 140 Solution • 140 Example: Selecting a cloud provider agent • 140 Example implementation • 141 Consequences • 142 Implementation guidance • 142 Supervision Tree with Guarded Capabilities • 142 Context • 143 Problem • 143 Solution • 143 Example: Resilient web scraper • 143 Example implementation • 143 Consequences • 145 Implementation guidance • 145 Multi-Agent Planning ....................................................................................................................... 145 Context • 145 Problem • 146 Solution • 146 Table of Contents xii
Page 14
Example: Market analysis report generation • 146 Implementation example • 147 Consequences • 148 Implementation guidance • 148 Knowledge Sharing ......................................................................................................................... 148 Context • 149 Problem • 149 Solution • 149 Example: Shared customer service solutions • 149 Example implementation • 150 Consequences • 151 Implementation guidance • 151 Tool Routing in Multi-Agent Contexts .............................................................................................. 152 Context • 152 Problem • 152 Solution • 152 Example: Intelligent personal assistant • 153 Example implementation • 154 Consequences • 155 Implementation guidance • 155 Consensus ........................................................................................................................................ 155 Context • 156 Problem • 156 Solution • 156 Example: Financial forecasting debate • 156 Example implementation • 158 Consequences • 159 Implementation guidance • 159 Agent Negotiation ........................................................................................................................... 160 Context • 160 Problem • 160 Solution • 160 Example: Negotiating for a shared resource • 161 Example implementation • 162 Consequences • 164 Implementation guidance • 164 Resource Allocation ......................................................................................................................... 164 Context • 164 xiii Table of Contents
Page 15
Problem • 165 Solution • 165 Example: Autonomous robot allocation in a smart factory • 165 Example implementation • 166 Consequences • 168 Implementation guidance • 168 Conflict Resolution .......................................................................................................................... 169 Context • 169 Problem • 169 Solution • 170 Hierarchical resolution • 170 Policy-based resolution • 170 Negotiation • 170 Game-theoretic resolution • 170 Example: Resolving an enterprise workflow conflict • 171 Example implementation • 172 Consequences • 174 Implementation guidance • 174 Conflict detection: the first step • 174 Explainable resolutions: the audit trail • 174 Defined escalation paths: human-in-the-loop • 174 Simulate to understand: testing for resilience • 175 The foundation for coherence and stability • 175 Formation Control ............................................................................................................................ 175 Context • 175 Problem • 176 Solution • 176 Example: Agricultural drone swarm • 176 Example implementation • 178 Consequences • 179 Implementation guidance • 179 Summary .......................................................................................................................................... 179 Get This Book's PDF Version and Exclusive Extras ............................................................................ 181 Chapter 6: Explainability and Compliance Agentic Patterns 183 A strategic guide to implementing explainability and compliance patterns .................................... 184 Instruction Fidelity Auditing ........................................................................................................... 185 Context • 185 Table of Contents xiv
Page 16
Problem • 185 Solution • 185 Example: Auditing an e-commerce discount application • 185 Example implementation • 186 Consequences • 188 Implementation guidance • 188 Fractal Chain-of-Thought Embedding ............................................................................................ 188 Context • 189 Problem • 189 Solution • 189 Example: Collaborative research synthesis • 190 Example implementation • 191 Consequences • 192 Implementation guidance • 192 Persistent Instruction Anchoring ..................................................................................................... 192 Context • 193 Problem • 193 Solution • 193 Example: Maintaining constraints in financial reporting • 193 Example implementation • 194 Consequences • 196 Implementation guidance • 196 Shared Epistemic Memory ............................................................................................................... 196 Context • 196 Problem • 197 Solution • 197 Example: Supply chain disruption • 197 Example implementation • 198 Consequences • 200 Implementation guidance • 200 Pattern composition for systemic reliability .................................................................................... 201 Summary ......................................................................................................................................... 202 Chapter 7: Robustness and Fault Tolerance Patterns 205 Strategic guide to implementing robustness patterns ..................................................................... 206 Agent robustness is a spectrum of five levels • 206 System integration architecture: how the patterns work together • 208 Pattern chaining in practice: a loan application example • 208 xv Table of Contents
Page 17
Measuring robustness: key metrics for evaluation • 209 Parallel Execution Consensus .......................................................................................................... 210 Context • 210 Problem • 210 Solution • 210 Example: Validating a credit score assessment • 211 Example implementation • 212 Consequences • 213 Implementation guidance • 213 Delayed Escalation Strategy ............................................................................................................ 214 Context • 214 Problem • 214 Solution • 214 Example: Low-confidence compliance check • 214 Example implementation • 215 Consequences • 217 Implementation guidance • 217 Watchdog Timeout Supervisor ......................................................................................................... 217 Context • 218 Problem • 218 Solution • 218 Example: Preventing a hanging analysis agent • 218 Example implementation • 219 Consequences • 221 Implementation guidance • 221 Adaptive Retry with Prompt Mutation ............................................................................................. 221 Context • 222 Problem • 222 Solution • 222 Example: Fixing a failed data extraction • 222 Example implementation • 224 Consequences • 225 Implementation guidance • 226 Auto-Healing Agent Resuscitation ................................................................................................... 226 Context • 226 Problem • 226 Solution • 226 Example: Restarting a crashed data processing agent • 227 Table of Contents xvi
Page 18
Example implementation • 228 Consequences • 230 Implementation guidance • 230 Incremental Checkpointing ............................................................................................................. 230 Context • 231 Problem • 231 Solution • 231 Example: A multi-stage document processing pipeline • 231 Example implementation • 233 Consequences • 235 Implementation guidance • 235 Majority Voting Across Agents ......................................................................................................... 236 Context • 236 Problem • 236 Solution • 236 Example: Finalizing a loan application decision • 238 Example implementation • 238 Consequences • 240 Implementation guidance • 240 Causal Dependency Graph ............................................................................................................... 240 Context • 241 Problem • 241 Solution • 241 Example: Auditing a loan application decision • 241 Example implementation • 242 Consequences • 244 Implementation guidance • 245 Agent Self-Defense .......................................................................................................................... 245 Context • 245 Problem • 245 Solution • 245 Example: Neutralizing an attack on a feedback summarizer • 246 Example implementation • 247 Consequences • 249 Implementation guidance • 249 Agent Mesh Defense ........................................................................................................................ 249 Context • 250 Problem • 250 xvii Table of Contents
Page 19
Solution • 250 Example: Preventing a compromised chatbot from accessing a database • 250 Example implementation • 251 Consequences • 253 Implementation guidance • 253 Execution Envelope Isolation (Sandboxing) .................................................................................... 254 Context • 254 Problem • 254 Solution • 254 Example: Containing a malicious code interpreter • 255 Example implementation • 256 Consequences • 258 Implementation guidance • 258 Optimizing for Translation Overhead .............................................................................................. 258 Context • 259 Problem • 259 Solution • 259 Example: Summarizing a large document • 259 Example implementation • 260 Consequences • 262 Implementation guidance • 262 Rate-Limited Invocation ................................................................................................................. 262 Context • 262 Problem • 262 Solution • 263 Example: Managing a credit bureau API • 263 Example implementation • 264 Consequences • 265 Implementation guidance • 266 Fallback Model Invocation .............................................................................................................. 266 Context • 266 Problem • 266 Solution • 266 Example: Ensuring a chatbot is always available • 267 Example implementation • 268 Consequences • 270 Implementation guidance • 270 Trust Decay and Scoring .................................................................................................................. 270 Table of Contents xviii
Page 20
Context • 271 Problem • 271 Solution • 271 Example: Self-optimizing news summarization • 271 Example implementation • 273 Consequences • 274 Implementation guidance • 274 Canary Agent Testing ...................................................................................................................... 275 Context • 275 Problem • 275 Solution • 275 Example: Safely upgrading a summarization agent • 275 Example implementation • 276 Consequences • 278 Implementation guidance • 278 Summary ......................................................................................................................................... 279 Get This Book's PDF Version and Exclusive Extras .......................................................................... 280 Chapter 8: Human-Agent Interaction Patterns 281 Strategic guide to implementing human-agent interaction patterns .............................................. 282 Levels of human-agent interaction • 282 System integration architecture: how the patterns work together • 283 Pattern chaining in practice: a corporate travel booking example • 284 Measuring success: evaluation metrics by pattern • 285 Agent Calls Human (Human-in-the-Loop Escalation) .................................................................... 286 Context • 286 Problem • 286 Solution • 286 Example: Resolving a loan application ambiguity • 286 Example implementation • 288 Consequences • 290 Implementation guidance • 290 Human Delegates to Agent .............................................................................................................. 290 Context • 291 Problem • 291 Solution • 291 Example: Delegating market research • 291 Example implementation • 292 xix Table of Contents
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List