Prompt templates¶
Status: Current | Last reviewed: 2026-09-23
A prompt template is a reusable system prompt with optional variables. Use templates when you have prompts shared across agents, or prompts that other people in your tenant should be able to maintain without touching the pipeline editor.
Why use templates¶
If you're going to write a prompt once and never change it, paste it directly into the LLM stage and move on. Use a template when:
- The same prompt appears in more than one agent or version.
- A non-author needs to be able to edit the prompt without learning the pipeline editor.
- You want a clean diff history of prompt changes.
- You want to A/B test two prompts by swapping templates without otherwise rebuilding the pipeline.
Authoring a template¶
- From the left nav, open Tools & Templates, then Prompts.
- Click New template.
- Fill in:
- Name — what shows up in the picker.
- Description — when to use this template, what it expects.
- Body — the prompt itself. Use
{{variable_name}}syntax for placeholders. - List variables in the Variables panel. Each gets a name, a description, and an optional default.
- Save.
Markdown renders as you type¶
The prompt editor previews markdown inline while you write. Headings (# Title), bold (**text**), italics (*text*), inline code (`code`), bullet lists (- item), and blockquotes (> quote) render styled in place — so a long prompt reads the way it will be structured, not as raw symbols. The #, **, and other markers stay hidden until you click into a line, where they reappear so you can edit them, then tuck away again when you move off.
This is display only: the saved prompt is still plain markdown text, and {{variables}}, {{TOOL:…}}, and {{SUBAGENT:…}} tokens keep their own colored highlighting — even inside a heading. Nothing about how you author tokens or pick templates changes.
Using saved instructions in an agent¶
Open a stage's Behavior editor and expand it. The Prompt library shows saved snippets and full templates. Search by name, description, content or tag; filter by type, preview the instructions, and choose Insert. The text is inserted at the active instruction prompt's cursor, or at its end if you have not placed the cursor. This does not replace the greeting or the whole prompt.
Insertion copies the content. Later library edits do not update that copy. Variable references are retained; use the agent's Variables panel to configure sources and values. Existing bindings and defaults are not overwritten by a library item. The library is read only when viewing a published agent version.
The editor's existing backslash (\) prompt picker remains available for quick
insertion without expanding the workspace.
Variables you almost always want¶
Three variables show up in nearly every prompt:
| Variable | What to set it to |
|---|---|
{{tenant_name}} |
Your tenant's display name — appears in the agent's persona. |
{{language}} |
The conversation language. Defaults to en-US. |
{{caller_id}} |
Phone number / chat ID of the user, if available. |
These are populated automatically at runtime — you don't need to wire them. They show up in the variable list as system-provided.
Speech-capable agents also get {{ani}} (the caller's number) and {{dnis}} (the number they dialed). The prompt editor offers them on voice and copilot agents, and the Test sidebar includes them in Template Variables so you can set caller values for a test run. Text/chat agents do not add ANI/DNIS automatically.
Variables from a conversation-start workflow¶
If you attach a workflow to the agent's Audio Input → When the conversation starts hook (see the pipeline editor guide), every output that workflow declares in its End — Output parameters section becomes a top-level prompt variable. An output named summary is just {{summary}} — no prefix. They appear in the {{ dropdown labelled "on conversation start", populated for each call by the time the agent's first prompt renders.
On speech-capable agents, if an output name happens to match a built-in (e.g. you name one ani), it's automatically renamed with a number (ani1) so it can't overwrite the real caller number.
Versioning templates¶
Templates have their own version history. Click History on a template to see every revision and roll back if needed. Published agents pin to a specific revision; drafts always use the latest.
Sharing across tenants¶
Templates do not cross tenants. If you have multiple tenants and want the same prompt in each, copy it manually — by design, no tenant can read another tenant's templates.