{topic} are substituted in your YAML strings; literal JSON or dicts in the same string are left alone.
Quick Start
Basic Template Substitution
Create an Run with:
agents.yaml with a simple {topic} placeholder:praisonai "AI agents"How It Works
The template system uses a precise regex pattern to identify which braces to substitute: Pattern:\{([a-zA-Z_][a-zA-Z0-9_]*)\} — only Python-identifier-shaped placeholders are touched.
| Will Substitute | Won’t Substitute |
|---|---|
{topic} | {"key":"value"} |
{user_input} | {1,2,3} |
{task_name} | {} |
{model_config} | { spaced } |
Where It Applies
The brace-safe substitutor processes these YAML fields:| Field | Description | Example |
|---|---|---|
role | Agent role definition | "Expert in {topic}" |
goal | Agent objective | "Research {topic} thoroughly" |
backstory | Agent background | "You specialize in {topic}" |
description | Task description | "Analyze {topic} data" |
expected_output | Expected result | "Report on {topic} findings" |
{topic}— main input from CLI or Python API- Any other keys passed via
kwargsin the Python API
Common Patterns
WordPress/Gutenberg Blocks
API Response Examples
Configuration Snippets
Migration note: Before the latest release, YAML strings with literal
{...} could silently leave {topic} unsubstituted. Now they work as expected — no YAML changes required.Best Practices
Use {topic} as the canonical input placeholder
Use {topic} as the canonical input placeholder
Stick to
{topic} for the main input variable — it’s the standard CLI/API parameter:Write literal JSON naturally
Write literal JSON naturally
No escaping needed for JSON examples in prompts:
Pass extra variables via Python API
Pass extra variables via Python API
For variables beyond Then use
{topic}, use the Python API:{style} and {deadline} in your YAML.Related
Async Crew Kickoff
Native async execution with template substitution
Agent Configuration
Complete guide to agent YAML structure

