Skip to main content

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

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

  1. Per-render unique sentinel - A cryptographically random token is generated for each substitution
  2. Protection phase - User-provided values containing {{...}} are replaced with sentinel tokens
  3. Substitution phase - Template variables are substituted normally
  4. 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: