Skip to main content
The user passes runtime values; {topic} and similar placeholders expand in YAML strings while JSON literals stay intact.

Quick Start

1

Basic Template Substitution

Create an agents.yaml with a simple {topic} placeholder:
Run with: praisonai "AI agents"
2

JSON Literals + Variables Together

Mix JSON examples in backstory with {topic} placeholders safely:
Both {topic} and the JSON literals work correctly.

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.

Where It Applies

The brace-safe substitutor processes these YAML fields: Available variables:
  • {topic} — main input from CLI or Python API
  • Any other keys passed via kwargs in 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

Stick to {topic} for the main input variable — it’s the standard CLI/API parameter:
No escaping needed for JSON examples in prompts:
For variables beyond {topic}, use the Python API:
Then use {style} and {deadline} in your YAML.

Async Crew Kickoff

Native async execution with template substitution

Agent Configuration

Complete guide to agent YAML structure

Workflow Input Resolution

How the YAML input: field fills {{input}} and its CLI precedence