Overview

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.

Author Template JSON
POST to API
Push Lead
Cron Picks Up Lead
Template Loaded at Call Time
Conversation Executes

TemplateModel fields

FieldTypeDescription
idUUIDUnique identifier (auto-generated)
reseller_idUUIDReseller that owns this template
namestringHuman-readable name (e.g. "appointment-reminder")
flowFlowModelConversation flow — nodes, global functions, callbacks
expected_payload_schemaJSON SchemaValidates the lead payload before the call starts
configurationsobjectTemplate-level config — STT, TTS, VAD, LLM
secretsDict[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_schemaJSON SchemaValidation schema for responses returned by HTTP global functions — use this to constrain what the LLM may rely on from a callback.
outbound_number_idUUIDDefault outbound number (see Numbers)
is_activebooleanWhether the template is active for calls

FlowModel structure

initial_node
Node A → transition
Node B → transition
Node C → end
end_conversation_callbacks
FieldTypeDescription
initial_nodestringName of the first node
nodesFlowNodeModel[]Array of conversation phase definitions
global_functionsarrayFunctions available in every node
end_conversation_callbacksarrayHTTP 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.

POST /agent/voice/breeze-buddy/templates
GET /agent/voice/breeze-buddy/templates/{template_id}
PUT /agent/voice/breeze-buddy/templates/{template_id}
DELETE /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:

FieldTypeDescription
initial_greetingstringStatic 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_namestringVoice used when the widget’s voice-mode attachment is active. Same values as the voice pipeline TTS config — see TTS.
stt_configurationobjectSTT 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

`template_vars` passed in the widget session create request (e.g. `customer_name`, `shop_name`) are injected into system prompts and the `initial_greeting` exactly like voice leads — same {variable} syntax, same resolver.
Was this helpful?