AI Patterns and Best Practices
Reusable patterns and best practices for designing and building AI-powered systems.
Workflow Architecture Patterns
Section titled “Workflow Architecture Patterns”The playbook’s one catalogue of patterns for AI workflows, from a single augmented LLM call to multi-agent systems and fully autonomous agents. Each pattern is mapped to an autonomy level by what decides the next step, with a decision tree for choosing the simplest one that works.
Explore Workflow Architecture Patterns →
Categories
Section titled “Categories”Prompting Patterns
Section titled “Prompting Patterns”Patterns for structuring and optimizing prompts. See the Prompt Engineering section for 14 detailed technique guides covering zero-shot, few-shot, chain-of-thought, and more.
Agent Patterns
Section titled “Agent Patterns”Patterns for building reliable AI agents. See Agent Capability Patterns for what one agent can do. For how several agents work together (handoffs, group chat, swarms and more), see the Workflow Architecture Patterns.
For a complete, running multi-agent pipeline — four specialist agents, a quality gate at every handoff, and one human approval gate — see the Autonomous Agent worked example. It documents the design decisions and the failures that motivated each one.
Integration Patterns
Section titled “Integration Patterns”Patterns for robust API integration.
Error Handling Patterns
Section titled “Error Handling Patterns”Patterns for graceful failure and recovery.
Adding a Pattern
Section titled “Adding a Pattern”Patterns use the topic template. Focus on:
- Problem - When to use this pattern
- Solution - The pattern structure
- Example - Working implementation
- Variations - Common adaptations
See CONTRIBUTING.md for guidelines.