{{today}} or custom placeholders; resolvers inject live values before the model runs.
How It Works
Quick Start
Built-in Variables
| Variable | Example Output | Description |
|---|---|---|
{{today}} | June 23, 2026 | Human-readable date |
{{date}} | 2026-06-23 | ISO date format |
{{now}} | 2026-06-23T11:00:00 | ISO datetime |
{{timestamp}} | 1737280800 | Unix timestamp |
{{uuid}} | a1b2c3d4-… | Random UUID |
{{year}} | 2026 | Current year |
{{month}} | June | Current month name |
Agent.start(), Agent.run(), and workflow execution.
Common Patterns
Workflow YAML
Direct substitution
Dynamic variables are lazy-loaded — no performance impact when unused.
Best Practices
Prefer {{today}} over hardcoded dates
Prefer {{today}} over hardcoded dates
Prompts with
{{today}} stay accurate across sessions without manual updates.Register custom providers once at startup
Register custom providers once at startup
Call
register_variable_provider() before creating agents that reference custom variables.Combine with static template variables
Combine with static template variables
Pass static values via
substitute_variables(text, {"topic": "AI"}) alongside built-in dynamic ones.Use in workflow YAML
Use in workflow YAML
Workflow task descriptions and goals support the same
{{today}}, {{year}}, and custom providers.Related
Templates
System and prompt templates
Workflows
YAML workflows with variable substitution

