Expressions
Template syntax
Section titled “Template syntax”Expressions are embedded in ${{ }} within any template string:
prompt: "Hello ${{ inputs.name }}, iteration ${{ run.iteration }}"Strings without ${{ }} are literal values.
Expression roots
Section titled “Expression roots”| Root | Scope | Description |
|---|---|---|
inputs | Always | Workflow input parameters |
steps | Always | Results from previous steps in scope |
env | Always | Environment variables |
run | Inside loops | Loop iteration context |
Path access
Section titled “Path access”Dot notation traverses objects and arrays:
inputs.name → input valueinputs.config.timeout → nested fieldsteps.review.result → full step resultsteps.judge.result.count → field in structured outputsteps.list.result.0.name → array index accessenv.CI → environment variablerun.iteration → loop counter (1-based)Operators
Section titled “Operators”| Operator | Example |
|---|---|
== != | steps.x.result == 'ok' |
> >= < <= | steps.x.result.count > 0 |
&& || | a && b |
! | !steps.x.result.passed |
Functions
Section titled “Functions”| Function | Description | Example |
|---|---|---|
format(fmt, ...) | String formatting | format('{0}:{1}', a, b) |
toJSON(value) | JSON stringification | toJSON(steps.data.result) |
join(array, delim) | Join array | join(steps.x.result.tags, ', ') |
len(value) | Count string chars, array items, or object keys | len(steps.review.result.findings) |
Literals
Section titled “Literals”null, true, false, numbers (42, 3.14), strings ('single quoted')