Modular Recipe Composition
Build complex workflows by composing smaller, reusable recipes together. Theinclude: pattern enables DRY (Don’t Repeat Yourself) recipe development.
Overview
Instead of duplicating common functionality across recipes, extract it into a standalone recipe and include it where needed:Usage Patterns
1. Include in Steps Format
For workflows using thesteps: format:
2. Include in Roles Format
For recipes using theroles: format (agents.yaml style), use the includes: section:
3. Include with Configuration
Pass custom input to included recipes:Python API
Include Class
Direct Class Usage
call_recipe Tool
Give agents the ability to call other recipes as a tool:run_recipe Function
Programmatically execute recipes:Creating Reusable Recipes
Recipe Structure
Example: wordpress-publisher
agents.yaml:Cycle Detection
The include system automatically detects circular includes:Best Practices
- Single Responsibility: Each recipe should do one thing well
- Clear Contracts: Document expected input/output formats
- Defensive Parsing: Handle missing or malformed input gracefully
- Idempotent Operations: Avoid side effects on retries
Available Recipes
List all available recipes:wordpress-publisher- Publish content to WordPresstranscript-generator- Generate transcripts from mediadata-transformer- Transform data between formats
Related
- Workflows - Workflow fundamentals
- YAML Workflows - YAML workflow syntax
- Recipe Registry - Browse available recipes

