A Hands-On Guide to Building Intelligent Systems
Antonio Gullí

#AI
#Agentic
#Design_Patterns
#LangChain
#Prompt
#RAG
#A2A
#GUI
#CLI
📘 این کتاب یک منبع عملی برای دولوپرهاییه که میخوان هنر ساخت AI Agentهای پیشرفته رو یاد بگیرن. با تکامل هوش مصنوعی از برنامههای ساده و واکنشی به موجودیتهای خودمختاری که میتونن Context رو درک کنن و تصمیمهای پیچیده بگیرن، این کتاب Design Patternها و تکنیکهای اثباتشدهای رو ارائه میده که برای ساخت موثر سیستمهای هوشمند بهشون نیاز داری.
🧩 هر کدوم از ۲۱ Design Pattern کتاب یک بلوک سازنده بنیادی برای ایجاد Agentهاییه که میتونن محیط خودشون رو درک کنن، تصمیمهای آگاهانه بگیرن و Actionها رو بهصورت خودمختار اجرا کنن.
🛠️ کتاب Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems بهصورت یک راهنمای جامع و دستبهکار طراحی شده و هر فصل به یک Agentic Pattern اختصاص داره. در هر فصل، توضیح کامل Pattern، کاربردها و Use Caseهای عملی، یک یا چند نمونه کد و نکتههای کلیدی برای مرور سریع ارائه میشه.
🧠 از مفاهیم پایهای مثل Prompt Chaining و Tool Use گرفته تا موضوعهای پیشرفتهای مثل Multi-Agent Collaboration و Self-Correction، دانش عملیای به دست میاری که میتونی بلافاصله در پروژههای خودت استفاده کنی. فصلها روی هم بنا میشن، اما کتاب رو میتونی بهعنوان یک مرجع هم استفاده کنی و مستقیما سراغ Patternهایی بری که مشکل فعلیت رو حل میکنن.
⚙️ برای اینکه مثالهای کد یک بستر واقعی داشته باشن، کتاب از سه فریمورک مهم توسعه Agent استفاده میکنه: LangChain و افزونه اون LangGraph برای ساخت توالیهای عملیاتی پیچیده و منعطف، Crew AI برای Orchestrate کردن چند Agent در یک ساختار مشخص، و Google Agent Developer Kit یا Google ADK برای ساخت، ارزیابی و دیپلوی Agentها.
🌐 با دیدن مثالها در این ابزارهای مختلف، درک گستردهای پیدا میکنی که چطور همین Patternها رو میشه در هر محیط فنی دیگهای هم پیادهسازی کرد.
🏗️ ساخت سیستمهای Agentic موثر فقط به یک مدل زبانی قدرتمند نیاز نداره؛ به ساختار و طراحی درست هم وابسته است. Agentic Patternها درست مثل Design Patternهای مهندسی نرمافزار، راهحلهای قابلاستفاده مجدد و امتحانشدهای برای چالشهای رایج ارائه میدن.
🧩 این Patternها یک زبان مشترک ایجاد میکنن که منطق Agentها رو روشنتر، قابلنگهداریتر و مقاومتر میکنه. تا پایان کتاب، هم درک تئوری و هم مهارت عملی لازم برای پیادهسازی این ۲۱ Pattern اصلی رو داری و میتونی سیستمهایی هوشمندتر، توانمندتر و خودمختارتر روی فریمورک دلخواه خودت بسازی.
📖 فهرست مطالب
پارت ۱. Patternها
فصل ۱. Prompt Chaining
فصل ۲. Routing
فصل ۳. Parallelization
فصل ۴. Reflection
فصل ۵. Tool Use یا Function Calling
فصل ۶. Planning
فصل ۷. Multi-Agent Collaboration
فصل ۸. Memory Management
فصل ۹. Learning and Adaptation
فصل ۱۰. Model Context Protocol
فصل ۱۱. Goal Setting and Monitoring
فصل ۱۲. Exception Handling and Recovery
فصل ۱۳. Human-in-the-Loop
فصل ۱۴. Knowledge Retrieval یا RAG
فصل ۱۵. Inter-Agent Communication یا A2A
فصل ۱۶. Resource-Aware Optimization
فصل ۱۷. Reasoning Techniques
فصل ۱۸. Guardrails و Safety Patternها
فصل ۱۹. Evaluation and Monitoring
فصل ۲۰. Prioritization
فصل ۲۱. Exploration and Discovery
پارت ۲. مطالب تکمیلی
فصل ۲۲. تکنیکهای پیشرفته Prompting
فصل ۲۳. تعاملهای Agentic AI. از GUI تا محیط دنیای واقعی
فصل ۲۴. مروری سریع بر فریمورکهای Agentic
فصل ۲۵. ساخت Agent با AgentSpace
فصل ۲۶. AI Agentها روی CLI
فصل ۲۷. زیر پوست سیستم. نگاهی به موتورهای Reasoning ایجنتها
فصل ۲۸. Coding Agentها
فصل ۲۹. نتیجهگیری
👤 درباره نویسنده
👨💼 آنتونیو گولی یکی از مدیران ارشد باتجربه Google است و در حال حاضر در Office of CTO نقش Engineering Director رو بر عهده داره.
🧠 او بیش از ۳۰ سال تجربه مرتبط داره و یکی از چهرههای شناختهشده صنعت در حوزههای AI، Search و Cloud محسوب میشه.
☁️ آنتونیو تجربه گستردهای در مدیریت تیمهای فنی و ارائه راهکارهای Google Cloud در صنایع مختلف منطقه EMEA داره. او قبلا بهعنوان Site Lead و Engineering Director در Google فعالیت کرده و تیمهای Cloud و تیمهای Cross-Functional رو با همکاری نزدیک با سایتهای بینالمللی و تیمهای فروش هدایت کرده.
📚 او نویسنده کتاب Deep Learning for Keras هم هست که با هدف گسترش آگاهی و فرهنگ علمی نوشته شده.
🎓 آنتونیو مدرک PhD در Computer Science از University of Pisa و مدرک کارشناسی ارشد مهندسی از همین دانشگاه داره. همچنین مدرک کارشناسی ارشد Practice Engineering و کارشناسی Computer Science رو هم از University of Pisa دریافت کرده.
⚙️ حوزههای تخصصی او شامل Software Engineering، AI، Search، Cloud، Kubernetes، Keras و Deep Learning میشن. او همینطور Board Member و VC Advisor است.
This book is a practical resource designed to help developers master the art of building sophisticated AI agents. As artificial intelligence evolves from simple reactive programs to autonomous entities capable of understanding context and making complex decisions, this book provides the essential Design Patterns and proven techniques needed to construct intelligent systems effectively. Each of the 21 Design Patterns represents a fundamental building block for creating agents that can perceive their environment, make informed decisions, and execute actions autonomously.
Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems is structured as a comprehensive hands-on guide, with each chapter dedicated to a single agentic pattern. Within each chapter, you will find a detailed pattern overview, practical applications and use cases, one or more hands-on code example, and key takeaways for quick review. From foundational concepts such as Prompt Chaining and Tool Use to advanced topics like Multi-Agent Collaboration and Self-Correction, readers will gain practical knowledge they can immediately apply. While the chapters build on each other, you can also use the book as a handy reference, jumping to patterns that address your specific challenges.
To provide a tangible "canvas" for the code examples, this guide utilizes three prominent agent development frameworks: LangChain and its extension LangGraph, which offer a flexible way to build complex operational sequences; Crew AI, which provides a structured framework for orchestrating multiple agents; and the Google Agent Developer Kit (Google ADK), which offers tools for building, evaluating, and deploying agents. By showcasing examples across these tools, you will gain a broad understanding of how these patterns can be applied in any technical environment.
Building effective agentic systems requires more than just a powerful language model; it demands structure and design. Agentic patterns provide reusable, battle-tested solutions to common challenges, much like design patterns in software engineering. They offer a common language that makes an agent's logic clearer, more maintainable, and more robust. By the end of this journey, you will possess both the theoretical understanding and the practical skills to implement these 21 essential patterns, enabling you to build more intelligent, capable, and autonomous systems on your chosen development canvas.
Table of Contents
Part I. The Patterns
Chapter 1. Prompt Chaining
Chapter 2. Routing
Chapter 3. Parallelization
Chapter 4. Reflection
Chapter 5. Tool Use (Function Calling)
Chapter 6. Planning
Chapter 7. Multi-Agent Collaboration
Chapter 8. Memory Management
Chapter 9. Learning and Adaptation
Chapter 10. Model Context Protocol
Chapter 11. Goal Setting and Monitoring
Chapter 12. Exception Handling and Recovery
Chapter 13. Human-in-the-Loop
Chapter 14. Knowledge Retrieval (RAG)
Chapter 15. Inter-Agent Communication (A2A)
Chapter 16. Resource-Aware Optimization
Chapter 17. Reasoning Techniques
Chapter 18. Guardrails/Safety Patterns
Chapter 19. Evaluation and Monitoring
Chapter 20. Prioritization
Chapter 21. Exploration and Discovery
Part II. The Supplement
Chapter 22. Advanced Prompting Techniques
Chapter 23. AI Agentic Interactions: From GUI to Real World Environment
Chapter 24. A Quick Overview of Agentic Frameworks
Chapter 25. Building an Agent with AgentSpace
Chapter 26. AI Agents on the CLI
Chapter 27. Under the Hood: An Inside Look at the Agents’ Reasoning Engines
Chapter 28. Coding Agents
Chapter 29. Conclusion
Antonio Gulli is a highly experienced Senior Director at Google, currently leading the Engineer Director role in the Office of CTO. With over 30 years of relevant experience, Antonio is a well-known figure in the industry, with a strong background in AI, Search, and Cloud technologies. Antonio has extensive experience managing technical teams and providing Google Cloud technology solutions across EMEA industry. He has previously served as Site Lead and Engineering Director for Google, where he managed cloud teams and led cross-functional teams in strong collaboration with international sites and sales functions. Antonio has also authored the book "Deep Learning for Keras" to increase science culture awareness. Antonio's educational background is impressive, with a Ph.D. in Computer Science from the University of Pisa and a Master's degree in Engineering from the same university. He also holds a Master's degree in Practice Engineering from the University of Pisa and a Bachelor's degree in Computer Science from the University of Pisa. Antonio's technical expertise includes Senior Software Engineer, AI, Search, Cloud Kubernetes, Keras, and Deep Learning. He is also a Board Member and VC Advisor, making him a valuable asset to any organization.









