Skip to main content
Variable substitution enables dynamic content replacement using {{variable}} placeholders that resolve at runtime, supporting both flat variables and dot-notation for nested data structures.
The user includes placeholders in the prompt; the agent resolves variables before answering.

How It Works

Quick Start

1

Dynamic placeholders in prompts

Built-in providers such as {{today}}, {{now}}, and {{uuid}} resolve when the agent runs:
2

Dot notation for nested data

Pass a variables dict when substituting text in workflows or templates:
3

Graceful fallback for missing keys

Missing segments stay as literal placeholders — no error is raised:

How It Works


Configuration Options

Traversal Rules:
  • Only dict objects are traversed (not lists, objects, or attributes)
  • Provider registry is consulted only for non-dotted names
  • Missing segments result in graceful fallback (no errors)

Common Patterns

Pattern 1: User configuration

Pattern 2: API Endpoint Templates

Pattern 3: Multi-Level Data Access


Best Practices

Choose clear, descriptive names that make templates self-documenting.
Organize related data into logical groupings for cleaner templates.
Design templates that degrade gracefully when optional data is missing.
Keep dot-notation paths reasonably short for maintainability.

YAML Template Variables

Brace-safe {topic} placeholders in YAML

Workflow Variables

Variable passing between workflow steps