Skip to content

AI Patterns and Best Practices

Reusable patterns and best practices for designing and building AI-powered systems.

Seven architectural patterns for AI workflows, ranging from simple augmented LLMs to fully autonomous agents. Use these patterns to choose the right level of complexity for your workflow.

Explore Workflow Architecture 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.

Patterns for building reliable AI agents. See Agent Capability Patterns for seven patterns that make agents effective.

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.

Patterns for robust API integration.

Patterns for graceful failure and recovery.

Patterns use the topic template. Focus on:

  1. Problem - When to use this pattern
  2. Solution - The pattern structure
  3. Example - Working implementation
  4. Variations - Common adaptations

See CONTRIBUTING.md for guidelines.