Overview
Templates provide pre-built AI agent workflows that can be installed, customized, and run. The default repository isagent-recipes on GitHub.
Templates support custom directories with precedence-based discovery and input sentinel protection for secure variable substitution.
Python API
Load a Template
List Available Templates
Search Templates
Install a Template
Clear Cache
Create Agent from Template
Create Workflow from Template
Template URI Formats
Available Templates
Custom Templates Directory
Templates can be discovered from multiple directories with precedence:Search Path Precedence
When the same template name exists in multiple locations, the higher priority version is used.
Input Sentinel Protection
Templates use secure variable substitution that protects user input from injection:How It Works
- Per-render unique sentinel - A cryptographically random token is generated for each substitution
- Protection phase - User-provided values containing
{{...}}are replaced with sentinel tokens - Substitution phase - Template variables are substituted normally
- Restoration phase - Sentinel tokens are replaced with original user values
- Template injection attacks
- Accidental variable resolution in user content
- Sentinel collision attacks (unique per render)

