Skip to content

Voice Agent Configuration

Vapi.ai Assistant Setup and Tools


Assistant Overview

Setting Value
Name VitaraVox Medical Receptionist
Model OpenAI GPT-4o
Temperature 0.7
Max Tokens 500
HIPAA Mode Enabled
Recording Enabled

Voice Configuration

English Voice

Setting Value
Provider Azure
Voice en-CA-ClaraNeural
Locale Canadian English
Speed 1.0x

Mandarin Voice

Setting Value
Provider Azure
Voice zh-CN-XiaoxiaoNeural
Locale Simplified Chinese
Speed 1.0x

Transcription

Setting Value
Provider Deepgram
Model Nova-2
Language Multilingual
Smart Format Enabled
Punctuation Enabled

Call Settings

Setting Value
Silence Timeout 30 seconds
Max Duration 600 seconds (10 min)
Interruption After 3 words
End Call Phrases "goodbye", "thank you, bye"

System Prompt (v2.0)

Location: /opt/vitara-platform/vapi-config/system-prompt-v2.md

Identity Section

You are **Vitara**, a warm and professional medical clinic receptionist.
You help patients schedule, reschedule, cancel appointments, and register
new patients.

**Languages:** English and Mandarin Chinese. Detect automatically and
respond in the same language.

**Current Time:** {{now | date: "%B %d, %Y %I:%M %p", "America/Vancouver"}}

Core Behaviors

  • Natural & Courteous: Warm, patient, says "please" and "thank you"
  • One Question at a Time: Never overwhelm the caller
  • Handle Delays: Say "Just one moment please..." if tool > 3 seconds
  • Never Say: "function", "tool", "API", "database", technical jargon

Conversation Flows

Flow Triggers
Booking "book", "schedule", "appointment"
Reschedule "change", "move", "reschedule"
Cancel "cancel", "remove"
Registration "new patient", "register", "first time"
Information "hours", "location", "address"
Transfer Medical questions, frustrated caller

Tools Definition (14 Tools)

Location: /opt/vitara-platform/vapi-config/tools-definition-v2.json

Patient Lookup Tools

search_patient_by_phone

{
  "name": "search_patient_by_phone",
  "description": "Search for a patient by their phone number",
  "parameters": {
    "type": "object",
    "properties": {
      "phone": {
        "type": "string",
        "description": "Phone number in E.164 format"
      }
    },
    "required": ["phone"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/search-patient-by-phone"
  }
}

search_patient

{
  "name": "search_patient",
  "description": "Search for a patient by name",
  "parameters": {
    "type": "object",
    "properties": {
      "firstName": { "type": "string" },
      "lastName": { "type": "string" }
    },
    "required": ["lastName"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/search-patient"
  }
}

get_patient

{
  "name": "get_patient",
  "description": "Get full patient details",
  "parameters": {
    "type": "object",
    "properties": {
      "demographicNo": { "type": "integer" }
    },
    "required": ["demographicNo"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/get-patient"
  }
}

Clinic Tools

get_clinic_info

{
  "name": "get_clinic_info",
  "description": "Get clinic information including hours and registration status",
  "parameters": {
    "type": "object",
    "properties": {
      "clinicId": { "type": "string" }
    }
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/get-clinic-info"
  }
}

get_providers

{
  "name": "get_providers",
  "description": "Get list of providers at the clinic",
  "parameters": {
    "type": "object",
    "properties": {
      "clinicId": { "type": "string" }
    }
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/get-providers"
  }
}

Appointment Tools

find_earliest_appointment

{
  "name": "find_earliest_appointment",
  "description": "Find the earliest available appointment slot",
  "parameters": {
    "type": "object",
    "properties": {
      "appointmentType": {
        "type": "string",
        "enum": ["B", "2", "3", "P"],
        "description": "B=15min follow-up, 2=30min new, 3=45min physical, P=phone"
      },
      "providerId": {
        "type": "string",
        "description": "Provider ID or 'any'"
      },
      "startDate": { "type": "string", "format": "date" }
    },
    "required": ["appointmentType"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/find-earliest-appointment"
  }
}

check_appointments

{
  "name": "check_appointments",
  "description": "Check available appointments or patient's existing appointments",
  "parameters": {
    "type": "object",
    "properties": {
      "demographicNo": { "type": "integer" },
      "providerId": { "type": "string" },
      "startDate": { "type": "string" },
      "endDate": { "type": "string" },
      "findAvailable": { "type": "boolean" }
    }
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/check-appointments"
  }
}

create_appointment

{
  "name": "create_appointment",
  "description": "Book a new appointment",
  "parameters": {
    "type": "object",
    "properties": {
      "demographicNo": { "type": "integer" },
      "providerNo": { "type": "string" },
      "date": { "type": "string" },
      "startTime": { "type": "string" },
      "duration": { "type": "integer" },
      "appointmentType": { "type": "string" },
      "reason": { "type": "string" }
    },
    "required": ["demographicNo", "providerNo", "date", "startTime", "appointmentType"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/create-appointment"
  }
}

update_appointment

{
  "name": "update_appointment",
  "description": "Reschedule an existing appointment",
  "parameters": {
    "type": "object",
    "properties": {
      "appointmentNo": { "type": "integer" },
      "newDate": { "type": "string" },
      "newStartTime": { "type": "string" }
    },
    "required": ["appointmentNo"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/update-appointment"
  }
}

cancel_appointment

{
  "name": "cancel_appointment",
  "description": "Cancel an appointment",
  "parameters": {
    "type": "object",
    "properties": {
      "appointmentNo": { "type": "integer" },
      "reason": { "type": "string" }
    },
    "required": ["appointmentNo"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/cancel-appointment"
  }
}

Registration Tools

register_new_patient

{
  "name": "register_new_patient",
  "description": "Register a new patient in the EMR",
  "parameters": {
    "type": "object",
    "properties": {
      "firstName": { "type": "string" },
      "lastName": { "type": "string" },
      "dateOfBirth": { "type": "string" },
      "sex": { "type": "string", "enum": ["M", "F", "O"] },
      "hin": { "type": "string", "description": "BC PHN (10 digits)" },
      "phone": { "type": "string" },
      "email": { "type": "string" },
      "address": {
        "type": "object",
        "properties": {
          "street": { "type": "string" },
          "city": { "type": "string" },
          "province": { "type": "string" },
          "postalCode": { "type": "string" }
        }
      }
    },
    "required": ["firstName", "lastName", "dateOfBirth", "phone"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/register-new-patient"
  }
}

add_to_waitlist

{
  "name": "add_to_waitlist",
  "description": "Add a patient to the new patient waitlist",
  "parameters": {
    "type": "object",
    "properties": {
      "clinicId": { "type": "string" },
      "firstName": { "type": "string" },
      "lastName": { "type": "string" },
      "phone": { "type": "string" },
      "email": { "type": "string" },
      "notes": { "type": "string" }
    },
    "required": ["firstName", "lastName", "phone"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/add-to-waitlist"
  }
}

Call Management Tools

transfer_call

{
  "name": "transfer_call",
  "description": "Transfer call to clinic staff",
  "parameters": {
    "type": "object",
    "properties": {
      "reason": {
        "type": "string",
        "enum": ["medical_question", "billing", "frustrated", "registration_error", "patient_request"]
      },
      "context": { "type": "string" }
    },
    "required": ["reason"]
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/transfer-call"
  }
}

log_call_metadata

{
  "name": "log_call_metadata",
  "description": "Log call outcome for analytics",
  "parameters": {
    "type": "object",
    "properties": {
      "clinicId": { "type": "string" },
      "vapiCallId": { "type": "string" },
      "callerPhone": { "type": "string" },
      "demographicId": { "type": "integer" },
      "language": { "type": "string" },
      "intent": { "type": "string" },
      "outcome": { "type": "string" },
      "appointmentId": { "type": "integer" },
      "durationSeconds": { "type": "integer" },
      "transferredToStaff": { "type": "boolean" },
      "transferReason": { "type": "string" }
    }
  },
  "server": {
    "url": "https://api.vitaravox.ca:9443/api/vapi/log-call"
  }
}

Appointment Type Mapping

Patient Says Type Code Duration
"refill", "follow-up", "quick question" B 15 min
"new concern", "checkup", "symptom" 2 30 min
"physical", "annual", "comprehensive" 3 45 min
"phone call", "virtual" P 15 min

Vapi Dashboard Setup

Step 1: Create Assistant

  1. Go to dashboard.vapi.ai
  2. Click Create Assistant
  3. Name: "VitaraVox Medical Receptionist"
  4. Model: GPT-4o

Step 2: Configure System Prompt

  1. Copy content from system-prompt-v2.md
  2. Paste into System Prompt field

Step 3: Add Tools

  1. Go to Tools section
  2. Click Add Tool for each of the 14 tools
  3. Configure server URL for each

Step 4: Configure Voice

  1. Voice Provider: Azure
  2. Voice: en-CA-ClaraNeural
  3. Enable multilingual support

Step 5: Assign Phone Number

  1. Go to Phone Numbers
  2. Assign number to assistant
  3. Update Vitara DB with number

Testing

Test Call Flow

# 1. Call the Vapi number
# 2. Say "I'd like to book an appointment"
# 3. Verify patient lookup works
# 4. Complete booking
# 5. Verify in OSCAR EMR

Test Webhook

curl -X POST https://api.vitaravox.ca:9443/api/vapi/health

Next Steps