Skip to main content
Use {{ ... }} inside strings to render values. Only double braces trigger interpolation; single braces are treated as literal text.
agent summarize {
    model: model.fast
    instruction: "Summarize task {{ input.task_id }} in project {{ input.project_id }}."

    output {
        summary: string
    }
}
References inside interpolation are validated the same way as references elsewhere.

Single braces are literal

Single { ... } characters are passed through as-is. This makes it easy to embed JSON or other brace-heavy content in strings without escaping:
agent format_json {
    model: model.fast
    instruction: """Return valid JSON: {"name": "{{ input.name }}", "status": "ok"}"""

    output {
        result: string
    }
}
In the example above, { and } around the JSON are literal text, while {{ input.name }} is interpolated.

Multiline strings

Use triple quotes for multiline instructions while still using interpolation:
agent summarize {
    model: model.fast
    instruction: """
        You are helping with task {{ input.task_id }}.
        Focus on project {{ input.project_id }}.
        Return a concise summary.
    """

    output {
        summary: string
    }
}

Interpolating agent outputs

agent writer {
    model: model.fast
    instruction: "Write a response using this summary: {{ agent.summarize.summary }}"

    output {
        response: string
    }
}
Prefer focused instructions that reference structured values rather than copying large payloads into one string.