@Huahuazo: 现在 AI Agent 概念满天飞,可真要落地复杂业务,一堆硬骨头就全冒出来了——架构怎么搭、记忆怎么管、多 Agent 怎么协调才不互相拆台。 越写越乱,最后代码直接糊成一锅粥,上线更是想都别想。 看到一本开源书,叫 Agentic D…
摘要
这是一本名为《Agentic Design Patterns》的开源书,提供21章和7个附录,系统讲解AI Agent的设计模式,覆盖从基础到企业级生产环境,每章配有Jupyter Notebook实践。
查看缓存全文
缓存时间: 2026/07/06 12:11
现在 AI Agent 概念满天飞,可真要落地复杂业务,一堆硬骨头就全冒出来了——架构怎么搭、记忆怎么管、多 Agent 怎么协调才不互相拆台。
越写越乱,最后代码直接糊成一锅粥,上线更是想都别想。
看到一本开源书,叫 Agentic Design Patterns,专治这种无从下手的迷茫。
这套体系相当不错: ① 21 章正文加 7 个附录,按难度拆成四个部分,从入门到企业级全链路覆盖 ② 每章都配了 Jupyter Notebook,不是让你干瞪眼,而是边读边跑代码,理论和实操焊死在一起 ③ 前半程打地基:提示链、路由、并行、反思、工具调用、多 Agent 协作,核心模式一次讲透 ④ 后半程直接对准生产环境:记忆管理、异常恢复、人机协作、安全护栏、性能评估,上线前可能踩的坑基本都替你蹚平了 ⑤ 附录里还塞了框架对比和高级提示技巧,随手翻翻就能补漏 从“会用 Agent”到“能设计 Agent 系统”,差的就是这套系统方法论。
https://github.com/evoiz/Agentic-Design-Patterns…
evoiz/Agentic-Design-Patterns
Source: https://github.com/evoiz/Agentic-Design-Patterns
📚 Agentic Design Patterns - A Hands-On Guide to Building Intelligent Systems
📖 About This Repository
This repository contains the complete materials for “Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems” by Antonio Gulli. It includes all chapters in PDF format and accompanying code notebooks for hands-on learning.
Note: All author royalties are donated to Save the Children 💝
🎯 What You’ll Learn
This comprehensive guide covers 21 chapters and 7 appendices on building intelligent AI agent systems, including:
- Foundational Patterns: Prompt chaining, routing, parallelization
- Advanced Techniques: Reflection, tool use, planning, multi-agent systems
- Memory & Learning: Memory management, adaptation, goal setting
- Production Patterns: Exception handling, human-in-the-loop, RAG
- Optimization: Resource-aware patterns, reasoning techniques, guardrails
- Real-world Applications: From GUI to real-world environments
📁 Repository Structure
.
├── 📄 README.md # This file
├── 📚 book/
│ └── Agentic_Design_Patterns_Complete.pdf # Complete book (424 pages)
├── 💻 chapter_notebooks/ # Chapter
│ ├── Chapter_01_Prompt_Chaining.ipynb
│ ├── Chapter_02_Routing.ipynb
│ ├── Chapter_03_Parallelization.ipynb
│ ├── ...
│ └── Appendix_G_Coding_Agents.ipynb
📚 Table of Contents
Introduction & Foundations
- Dedication
- Acknowledgment
- Foreword
- A Thought Leader’s Perspective: Power and Responsibility
- Introduction
- What makes an AI system an “agent”?
Part One: Core Patterns (103 pages)
- Chapter 1: Prompt Chaining - Sequential task decomposition
- Chapter 2: Routing - Dynamic path selection
- Chapter 3: Parallelization - Concurrent processing
- Chapter 4: Reflection - Self-improvement mechanisms
- Chapter 5: Tool Use - External capability integration
- Chapter 6: Planning - Strategic task management
- Chapter 7: Multi-Agent - Collaborative systems
Part Two: Advanced Patterns (61 pages)
- Chapter 8: Memory Management - State persistence
- Chapter 9: Learning and Adaptation - Dynamic improvement
- Chapter 10: Model Context Protocol (MCP) - Standardized interfaces
- Chapter 11: Goal Setting and Monitoring - Objective tracking
Part Three: Production Patterns (34 pages)
- Chapter 12: Exception Handling and Recovery - Robust error management
- Chapter 13: Human-in-the-Loop - Human-AI collaboration
- Chapter 14: Knowledge Retrieval (RAG) - Information access patterns
Part Four: Enterprise Patterns (114 pages)
- Chapter 15: Inter-Agent Communication (A2A) - Agent networking
- Chapter 16: Resource-Aware Optimization - Efficient resource usage
- Chapter 17: Reasoning Techniques - Advanced decision-making
- Chapter 18: Guardrails/Safety Patterns - Risk mitigation
- Chapter 19: Evaluation and Monitoring - Performance tracking
- Chapter 20: Prioritization - Task management
- Chapter 21: Exploration and Discovery - Autonomous learning
Appendices (74 pages)
- Appendix A: Advanced Prompting Techniques
- Appendix B: AI Agentic: From GUI to Real world environment
- Appendix C: Quick overview of Agentic Frameworks
- Appendix D: Building an Agent with AgentSpace
- Appendix E: AI Agents on the CLI
- Appendix F: Under the Hood: Reasoning Engines
- Appendix G: Coding agents
Conclusion & References
- Conclusion
- Glossary
- Index of Terms
🚀 Getting Started
Prerequisites
# Python 3.8 or higher required
python --version
# Install Jupyter for notebooks
pip install jupyter notebook
# Install common dependencies
pip install -r requirements.txt
Installation
- Clone the repository
git clone https://github.com/evoiz/Agentic-Design-Patterns.git
cd Agentic-Design-Patterns.git
- Set up virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install jupyter notebook
pip install pandas numpy matplotlib openai langchain
- Launch Jupyter Notebook
jupyter notebook
💻 Running the Code
Each chapter includes a Jupyter notebook with practical examples:
- Navigate to the
chapter_notebooks/directory - Open the desired chapter notebook
- Follow the instructions within each notebook
- Run cells sequentially for best learning experience
Example: Running Chapter 1
# Navigate to notebooks directory
cd chapter_notebooks
# Launch specific notebook
jupyter notebook Chapter_01_Prompt_Chaining.ipynb
📖 How to Use This Repository
For Self-Study
- Read each chapter in the PDF
- Open the corresponding notebook
- Run the code examples
- Experiment with modifications
- Complete the exercises
For Teaching
- Use chapters as lecture materials
- Assign notebooks as lab exercises
- Create custom examples based on patterns
- Build projects using multiple patterns
For Research
- Reference implementation patterns
- Benchmark different approaches
- Extend patterns for new use cases
- Contribute improvements back
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines.
Ways to Contribute
- 🐛 Report bugs and issues
- 💡 Suggest new features or patterns
- 📝 Improve documentation
- 🔧 Submit code improvements
- 🌍 Translate materials
Contribution Process
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📚 Additional Resources
Official Links
Related Frameworks
Learning Path
- Beginners: Start with Chapters 1-7 (Core Patterns)
- Intermediate: Progress through Chapters 8-14 (Advanced & Production)
- Advanced: Master Chapters 15-21 (Enterprise Patterns)
- Experts: Explore Appendices for cutting-edge techniques
⚖️ License
This repository is for educational purposes. Please respect the author’s copyright and intellectual property rights.
- Book Content: © Antonio Gulli - All rights reserved
- Code Examples: MIT License (see LICENSE file)
- Educational Use: Permitted with attribution
🙏 Acknowledgments
- Antonio Gulli - Author and AI thought leader
- Save the Children - Beneficiary of all book royalties
- Contributors - Everyone who helps improve these materials
- Community - Learners and practitioners advancing AI agents
📞 Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Author: LinkedIn
🌟 Star History
If you find this repository useful, please consider giving it a star ⭐
📊 Repository Stats
Building the future of AI, one pattern at a time 🚀
Made with ❤️ for the AI community
相似文章
@IndieDevHailey: 谷歌 Agent 设计模式中文版,终于来了! 还在漫无目的地刷论文、拼凑教程、踩一堆 Agent 坑? 这本《Agentic Design Patterns》直接把 AI Agent 的核心方法论、设计模式和实战框架一次性讲透了。 一次性…
谷歌《Agentic Design Patterns》中文版发布,涵盖21个AI Agent核心设计模式,从入门到工程化实践全面讲解,包括Prompt Chaining等关键概念。
本文系统梳理了AI Agent架构与工程实践,涵盖控制流、上下文工程、工具设计、记忆、多Agent组织、评测、追踪和安全,基于OpenClaw实现展开,强调Harness(测试验证基础设施)对系统稳定性的关键作用。
本文系统梳理了AI Agent架构与工程实践,涵盖控制流、上下文工程、工具设计、记忆、多Agent组织、评测、追踪和安全,基于OpenClaw实现展开,强调Harness(测试验证基础设施)对系统稳定性的关键作用。
@gyro_ai: 多数人学 Agent,要么停在概念层面,要么直接上框架,中间那层"为什么这样设计"往往是空的。 GitHub 上由 Datawhale 出品的《从零构建智能体》,16 章从基础到多 Agent 系统,自带 HelloAgents 框架边学…
Datawhale 开源教程《从零构建智能体》,16章覆盖记忆系统、RAG、上下文工程等,包含HelloAgents框架,适合想深入理解Agent内部机制的学习者。
@Xudong07452910: 开源免费好书推荐:《如何从零构建7×24小时AI Agent》 这是一本深度拆解30万行真实AI数字员工平台的技木书,系统讲解了: - Agent引擎与上下文工程 - 数字人协议 - AI浏览器实现 - 生产级调度系统 - 7×24小时稳…
推荐一本免费开源技术书《如何从零构建7×24小时AI Agent》,系统讲解AI Agent引擎、数字人协议、AI浏览器、生产级调度等实战内容,基于30万行真实开源项目Halo,并采用人机协作方式编写。
@Xudong07452910: 开源框架推荐:《Agency Agents》—— 232 位专业 AI 智能体,按职能分工,覆盖 16 个业务部门 如果你用过 Claude Code 或 Codex,可能遇到过这个问题:AI 在代码任务上很能干,但让它做前端设计、写营销…
Agency Agents 是一个开源框架,提供232个专业AI智能体覆盖16个业务部门,每个智能体具有独特个性、沟通风格和交付标准,支持Claude Code、GitHub Copilot等多种开发工具,并有社区翻译版本。