Overview
Design conversations as JSON — nodes, functions, hooks, variables, and the playground. No code deployment required.
What are templates?
A Template is the master blueprint for a voice agent conversation. It encapsulates the full conversation graph — nodes, transitions, functions, hooks, variables, and provider configuration — all as structured JSON.
Templates let you customize everything about a conversation without writing or deploying code. Change how the agent greets callers, what data it collects, when it transfers to a human, and how it reports outcomes — all by editing JSON and pushing it through the Templates API.
No-Code Deployment
Templates are loaded fresh for every call. Update a template via the API and the next call uses the new version — no restart, no redeployment, no downtime.
TemplateModel fields
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier (auto-generated) |
reseller_id | UUID | Reseller that owns this template |
name | string | Human-readable name (e.g. "appointment-reminder") |
flow | FlowModel | Conversation flow — nodes, global functions, callbacks |
expected_payload_schema | JSON Schema | Validates the lead payload before the call starts |
configurations | object | Template-level config — STT, TTS, VAD, LLM |
secrets | Dict[str, str] | Flat key→value map merged into the variable pool alongside the payload. Use for non-per-call secrets that belong to the template. |
expected_callback_response_schema | JSON Schema | Validation schema for responses returned by HTTP global functions — use this to constrain what the LLM may rely on from a callback. |
outbound_number_id | UUID | Default outbound number (see Numbers) |
is_active | boolean | Whether the template is active for calls |
FlowModel structure
| Field | Type | Description |
|---|---|---|
initial_node | string | Name of the first node |
nodes | FlowNodeModel[] | Array of conversation phase definitions |
global_functions | array | Functions available in every node |
end_conversation_callbacks | array | HTTP callbacks fired when the conversation ends |
Managing templates via API
Templates are stored in PostgreSQL as JSONB and managed through standard CRUD endpoints. All endpoints require authentication.
/agent/voice/breeze-buddy/templates /agent/voice/breeze-buddy/templates/{template_id} /agent/voice/breeze-buddy/templates/{template_id} /agent/voice/breeze-buddy/templates/{template_id} Key customization surfaces
- Flow Nodes — conversation phases, system prompts, pre/post actions
- Functions & Hooks — LLM-callable tools with side-effect hooks
- Global Functions — cross-node functions for data lookups and agent transfer
- Variables — dynamic placeholder syntax for injecting data
Buddy Assist (chat widget) templates
The same template system powers Buddy Assist — the storefront chat widget. A template bound to a widget_config row drives the AI conversation inside the embed. The flow nodes, functions, hooks, and variables work identically to voice templates; the only differences are in the configurations block.
Widget-specific configurations
Set these inside the template’s configurations object:
| Field | Type | Description |
|---|---|---|
initial_greeting | string | Static text the assistant sends as its first message when the session is created. Supports variable interpolation (e.g. "Hi {customer_name}!"). Omit to start silent — the user sends the first message. |
tts_voice_name | string | Voice used when the widget’s voice-mode attachment is active. Same values as the voice pipeline TTS config — see TTS. |
stt_configuration | object | STT provider + language for voice-mode. Same shape as STT config. |
All other configurations fields (LLM model, temperature, node-level VAD, input collection, etc.) apply to voice-mode only and are ignored during text-chat turns.
Minimal Buddy Assist template
{
"name": "shopify-assistant",
"flow": {
"initial_node": "greet",
"nodes": [
{
"node_name": "greet",
"task_messages": [
{
"role": "system",
"content": "You are a helpful shopping assistant for {shop_name}. Help the customer find products, check order status, and answer questions."
}
],
"functions": [
{ "name": "search_products", "transition_to": "greet" },
{ "name": "check_order", "transition_to": "greet" },
{ "name": "end_conversation", "transition_to": null }
]
}
]
},
"configurations": {
"initial_greeting": "Hi {customer_name}! How can I help you today?",
"tts_voice_name": "rhea",
"stt_configuration": { "provider": "deepgram", "language": "en" }
}
} Once this template exists, create a widget_config that references its id and you are ready to embed.
Template variables in chat
{variable} syntax, same resolver.