Skip to content

Template variables

Prompts use Nunjucks. Loops and conditionals work. Templates cannot read files, so include and extends are unavailable, and they do not execute shell commands.

Variable Reads
{{ inputs.goal }} The run’s goal.
{{ inputs.<name> }} An original declared input, unchanged by the run.
{{ context.<path> }} Any context value, including inputs a later node has changed.
{{ context.response.<node> }} A named agent’s final prose without its trailing output object. Empty if that agent has not completed. Cannot name a non-agent node.
{{ context.failure_reason }} Why the previous stage failed. Empty on success.
{{ context.parallel.results['0'].context.<name> }} A branch result after the join. The index is quoted.
{{ current_work }} The saved work scope from a work output.
{{ run.folders.<name>.path }} The current working path of that folder.
{{ project.folders.<name>.path }} That folder’s original project path.
{{ input }} The run’s primary input.

Folder names must match the project’s folders. The old ticket variable remains readable with a warning; prefer declared inputs.

cwd, facts[...], said, transcript and operator_messages are retired. Steering reaches the preamble instead of a template variable.

prompt_file="prompts/review.md" holds a full prompt in a companion file relative to the graph file that names it. Never specify both prompt and prompt_file. Sidecars are reread before later visits; an invalid edit reports a diagnostic and falls back to the validated prompt.

See context for what each value contains and defining context for when it is available.

Inline attribute expressions on this page are syntax fragments. Use the complete attribute wrapper and the linked runnable examples as validation contexts.