Principles, Patterns, and Implementation for AI Agents
Victor Dibia
2025-11-01
,Table of contents
1. Preface
1. About This Book
2. Who This Book Is For
3. What Makes This Book Different
4. Prerequisites
5. Implementation Philosophy
6. How This Book Is Organized
7. Code Examples and Resources
8. References and Academic Sources
9. Acknowledgments
2. 1 Understanding Multi-Agent Systems
1. 1.1 Introduction
2. 1.2 A Primer on Generative AI
3. 1.3 Why Multiple Agents? Complex Task Characteristics
4. 1.4 What is an Agent?
5. 1.5 What is a Multi-Agent System?
6. 1.6 Why Now?
7. 1.7 Choosing the Right AI Agent Architecture
8. 1.8 Building Your First Multi-Agent System
9. 1.9 Summary
3. 2 Multi-Agent Patterns
1. 2.1 A Taxonomy of Multi-Agent Orchestration Patterns
2. 2.2 Workflow Patterns (Explicit Control)
3. 2.3 Autonomous Patterns (Emergent Control)
4. 2.4 Pattern Selection and Comparison
5. 2.5 Task Management Patterns
6. 2.6 Summary
4. 3 UX Principles for Multi-Agent Systems
1. 3.1 Background: The Evolution of Interfaces and Software
Development
2. 3.2 The Multi-Agent Reliability Challenge
3. 3.3 Multi-Agent User Personas and Challenges
4. 3.4 Multi-Agent UX Design Principles
, 5. 3.5 Interactive vs Offline Multi-Agent Scenarios
6. 3.6 Summary
5. 4 Building Your First Agent
1. 4.1 Design Principles
2. 4.2 The Agent Execution Loop
3. 4.3 Task Cancellation
4. 4.4 Adding a Model Client
5. 4.5 Enabling Structured Output - The Key to Reliable Agents
6. 4.6 Adding Tools
7. 4.7 Adding Memory
8. 4.8 Agent-Managed Memory
9. 4.9 Adding Agent Middleware for Control and Observability
10. 4.10 OpenTelemetry: Industry-Standard Observability
11. 4.11 Agents as Tools
12. 4.12 Context Engineering
13. 4.13 Adding Humans in the Loop
14. 4.14 Summary
6. 5 Building Computer Use Agents
1. 5.1 When Code and APIs Aren’t Enough: The Role of Computer
Use Agents
2. 5.2 The Anatomy of a Computer Use Agent
3. 5.3 Interface Representation
4. 5.4 Action Executor (Interface Automation Tools)
5. 5.5 Implementing a Computer Use Agent
6. 5.6 Key Challenges in Computer Use Agents
7. 5.7 Production Considerations
8. 5.8 Summary
7. 6 Building Multi-Agent Workflows
1. 6.1 Workflows as Computational Graphs
2. 6.2 Adding Steps: Units of Computation
3. 6.3 Adding Edges: Connecting Steps with Transitions
4. 6.4 Building the Workflow Class
5. 6.5 Building the Workflow Runner
6. 6.6 Workflow Serialization and Persistence
7. 6.7 Workflow Checkpointing
8. 6.8 Summary
8. 7 Building Autonomous Multi-Agent Orchestration