Tutorial

Build your first template

A 10-minute walkthrough of designing a minimal voice-agent template — one greeting node, one farewell node, tested via Daily in your browser.

By the end of this tutorial you will have created a working template, pushed a lead, and heard the bot greet you in a browser — no phone call, no telephony provider, no code deployment. If you already know what a template is, skip to the Quick start and move faster.

Prerequisites

  • An authenticated API token — see Authentication.
  • A Breeze Buddy backend URL you can reach ($BASE_URL in the snippets below).
  • A Daily.co API key configured on the backend.
  • A terminal with curl and a modern browser.

Step 1 — Create the template

The template below has two nodes: a greeting that confirms an appointment, and a farewell that thanks the caller. It uses DAILY_TEST execution mode so you can test in a browser.

create-template.sh
bash
curl -X POST $BASE_URL/agent/voice/breeze-buddy/templates \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-first-template",
    "flow": {
      "initial_node": "greeting",
      "nodes": [
        {
          "node_name": "greeting",
          "task_messages": [
            { "role": "system", "content": "Greet the user warmly and say: hi {customer_name}, is this a good time to talk?" }
          ],
          "functions": [
            { "name": "user_confirmed", "transition_to": "farewell" },
            { "name": "user_busy", "transition_to": "farewell" }
          ]
        },
        {
          "node_name": "farewell",
          "task_messages": [
            { "role": "system", "content": "Thank the user and say goodbye." }
          ],
          "functions": [
            { "name": "end_call", "transition_to": null }
          ]
        }
      ]
    },
    "configurations": {
      "initial_greeting": "Hi {customer_name}, I am a demo agent.",
      "stt_configuration": { "provider": "deepgram", "language": "en" },
      "tts_voice_name": "rhea"
    }
  }'

The response returns the template’s id. Save it for the next step.

Step 2 — Push a lead in test mode

A lead represents one call to be made. DAILY_TEST routes the call into your browser instead of the phone network.

push-lead.sh
bash
curl -X POST $BASE_URL/agent/voice/breeze-buddy/leads \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "demo-1",
    "template": "my-first-template",
    "reseller_id": "your-reseller-id",
    "execution_mode": "DAILY_TEST",
    "payload": {
      "customer_mobile_number": "+14155551234",
      "customer_name": "Ada"
    }
  }'

The response includes lead_call_tracker_id. Save it for the next step — every subsequent endpoint calls it lead_id.

Step 3 — Connect in the browser

Call the connect endpoint with the lead ID and open the returned room_url in a browser.

connect.sh
bash
curl -X POST $BASE_URL/agent/voice/breeze-buddy/connect \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "lead_id": "$LEAD_CALL_TRACKER_ID" }'

Open room_url in Chrome or Safari. Grant mic permission. The bot greets you; respond “yes” or “I’m busy” and watch the flow transition to farewell.

Step 4 — Check the outcome

After the call ends, fetch the lead to see the outcome and transcript:

get-lead.sh
bash
curl $BASE_URL/agent/voice/breeze-buddy/leads/$LEAD_ID \
  -H "Authorization: Bearer $TOKEN"

You should see status: COMPLETED, an outcome, and a transcription array capturing what you both said.

What you built

A two-node template with function-driven transitions, tested end-to-end without a phone call or server restart. The template JSON lives in Breeze Buddy’s database; editing it is a PUT /templates/{id} away.

What to change first

Try adding a function that captures a data point (“What time works best?”) and a third node that asks a follow-up. See Functions and hooks for how the LLM calls functions to collect data.

Next steps

Was this helpful?