Overview
Templates provide pre-built AI agent workflows that can be installed, customized, and run. The default repository is agent-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
| Format | Example |
|---|
| Simple name | transcript-generator |
| Package | package:agent_recipes/transcript-generator |
| GitHub | github:owner/repo/template |
| GitHub with ref | github:owner/repo/template@v1.0.0 |
| Local path | ./my-template or ~/templates/test |
| HTTP URL | https://example.com/template.yaml |
Available Templates
| Template | Description |
|---|
transcript-generator | Generate transcripts from audio/video |
shorts-generator | Create short-form video clips |
video-editor | AI-powered video editing |
data-transformer | Transform data between formats |
Custom Templates Directory
Templates can be discovered from multiple directories with precedence:
Search Path Precedence
| Priority | Path | Source |
|---|
| 1 (highest) | Custom dirs (via custom_dirs) | custom |
| 2 | ~/.praisonai/templates | custom |
| 3 | ~/.config/praison/templates | custom |
| 4 | ./.praison/templates | project |
| 5 (lowest) | agent_recipes package | package |
When the same template name exists in multiple locations, the higher priority version is used.
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
This prevents:
- Template injection attacks
- Accidental variable resolution in user content
- Sentinel collision attacks (unique per render)
Security
Templates support allowlists and checksum verification: