Agent System Design Pattern
Published:
The aim of this series is to give an introduction to design patterns for agent systems. The pages are independent, but they share one question:
Where does the system need flexibility, and where does it need a stable, testable interface?
An agent system trades determinism for flexibility. A design pattern is a reusable way to buy back determinism at the boundary where the task requires it. Each page therefore describes the recurring problem, intent, structure, stable interface, variable implementation, trade-offs, failure modes, and an example.
Architecture figure: the system context view introduces the agent system’s external relationships; its internal containers are explained on the architecture-views page.
Claim. This series of blog posts was written in cooperation with AI.
Part I. Foundations
Part II. Workflow and control-flow patterns
Part III. Knowledge and reasoning patterns
- Context engineering
- Structured output and dependency injection
- Tool use and code execution
- Knowledge retrieval and provenance
- Deep search
- Reasoning and representation change
- Reflection
Part IV. Multi-agent and human coordination
Part V. Reliability and operations
- Memory management
- Learning and adaptation
- Exception handling and recovery
- Goal setting, prioritization, and termination
- Evaluation and monitoring
- The verification gate
- Resource-aware optimization
- Guardrails and safety
- Production architecture
- Choosing and composing patterns
- Architecture views
Part VI. Case study and domain-specific design
- Danus and Rethlas
- Proof-sketch and method-recommendation system
- Building an agent system for birational geometry
The first case study uses the real Danus and Rethlas codebases. The proof-sketch page develops a professional architecture for recommending proof methods and compiling them into critic-tested obligation graphs. The final page specializes that architecture to the spiraling induction that appears in birational geometry.
References
The series draws on six books, each covering a different altitude. Individual pages cite chapters and sections; this is the shared basis.
- Antonio Gulli, Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems, Springer, 2025. Publisher record. The broadest pattern catalogue, and the closest to this series’ organization.
- Victor Dibia, Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents, 2025. Book site. Strongest on the execution loop, context engineering, agent composition, and evaluation of trajectories rather than answers.
- Valliappa Lakshmanan and Hannes Hapke, Generative AI Design Patterns, O’Reilly, first edition, October 2025. Publisher record. Thirty-two numbered patterns at the level of individual mechanisms, including the retrieval, judging, and guardrail patterns used here.
- Sampriti Mitra, System Design for the LLM Era: Patterns and Principles for Production-Grade AI Architecture, Packt, first edition. Publisher record. The production and security altitude: gateways, fallbacks, caching, cost control, observability, and the named security threats.
- James Phoenix and Mike Taylor, Prompt Engineering for Generative AI, O’Reilly, first edition, May 2024, ISBN 978-1-098-15343-4. The level below the patterns: what a single well-specified inference should contain.
- Stephen Clear, Claude AI Bible: The Complete Guide to Mastering Claude, Claude Code, MCP, AI Agents and Automation. A practitioner reference for tool protocols, packaged capabilities, and agent SDK mechanics.
Primary research papers are cited on the pages where they apply, rather than collected here, so that each claim sits next to its source.