Skip to main content
Templates are text with {{ }} expressions that are resolved when an agent runs. This page lists where templates are accepted, what they can read, and every function. For an introduction, see Dynamic content. Templates use Go’s text/template syntax with the default {{ }} delimiters.

Where templates are accepted

Reading the message

What is available depends on the entry the run came in through. The Available entry handlers lists every variable of each handler.

Request functions

Trigger functions

Available from any entry

Transform functions

Condition functions

Used mainly in guards. Each returns true or false. title names the value being checked. It has no effect on a guard’s result.

Built into the template language

See Go’s text/template documentation for the rest.

Missing values and unknown functions

  • A variable or field that does not exist renders as an empty string.
  • A secret whose name matches nothing renders as an empty string.
  • A function that is not defined is a template error. In a guard, the config is refused when it is saved. In a prompt, the run fails.

Dynamic content

An introduction to templates, in plain language.

Available entry handlers

Every variable each handler provides.

Tools

Guards and action tool fields, which take templates.

Secrets

How secret looks a value up.