Skip to main content

Overview

An Agent is the core entity in Vaani — it’s your AI-powered virtual phone assistant. Each agent is configured with:
  • A system prompt that defines personality and behavior
  • LLM, STT, and TTS providers for language processing and voice
  • Custom functions (webhook-based tools the agent can invoke)
  • Call behavior settings (max duration, silence handling, transfer config)

Creating an Agent

1

Navigate to Agents

In the dashboard sidebar, click AgentsCreate Agent.
2

Configure Identity

SettingDescription
Agent NameDisplay name shown in dashboard and logs
Phone NumberUnique number assigned to this agent (auto-assigned or selected from provisioned numbers)
Agent TypeCategory label for organizational purposes
3

Choose AI Providers

Select from the available provider combinations:Language Model (LLM):
ProviderModelsBest For
OpenAIgpt-4o, gpt-4o-mini, gpt-4o-realtimeAccuracy, tool calling, realtime voice
Groqllama-3, mixtralSpeed and low latency
Speech-to-Text (STT):
ProviderModelsBest For
Deepgramnova-3English, multilingual, keyword boosting
SarvamVariousIndian languages (Hindi, Tamil, etc.)
CartesiaVariousGeneral purpose
Text-to-Speech (TTS):
ProviderBest For
OpenAICost-effective, good quality
ElevenLabsMost natural, premium voices
DeepgramLowest latency
RimeCustomizable voices
CartesiaGeneral purpose
SarvamIndian languages
MurfStudio-quality
InworldGaming/virtual character voices
4

Write Your System Prompt

The system prompt defines your agent’s personality, knowledge, and rules:
You are Sarah, a friendly appointments coordinator for Sunrise Dental Clinic.

Your responsibilities:
- Answer questions about our services (cleanings, fillings, root canals)
- Schedule, reschedule, and cancel appointments
- Collect patient information (name, phone, insurance)

Rules:
- Always be warm and professional
- If you can't answer a question, offer to transfer to a human agent
- Never provide medical advice
- Always confirm the appointment details before ending the call

Available appointment slots: Monday-Friday, 9 AM - 5 PM
Use double curly braces for dynamic variables that change per call: {{customer_name}}, {{appointment_date}}
5

Set the First Message

The first message is what the agent says when a call connects:
Hello! Thank you for calling Sunrise Dental. My name is Sarah. 
How can I help you today?
This is automatically delivered via TTS when the caller connects.
6

Configure Call Behavior

SettingDefaultDescription
Max Call Duration300s (5 min)Hard time limit before auto-disconnect
Silence Timeout30sDisconnect after this much silence
Ring Timeout30sHow long to ring on outbound calls
Agent Inactive ReminderPrompt if agent is idle too long
Noise CancellationBVEBackground noise filtering model
7

Add Custom Functions (Optional)

Custom functions let your agent take actions during calls by calling external webhooks:
{
  "name": "check_availability",
  "description": "Check appointment availability for a given date",
  "url": "https://api.your-clinic.com/availability",
  "method": "POST",
  "parameters": {
    "date": {
      "type": "string",
      "description": "The date to check (YYYY-MM-DD format)"
    }
  },
  "speak_during": "Let me check our availability for that date...",
  "speak_after": "I've found the available slots."
}
The agent will invoke this function when the conversation naturally requires it (determined by the LLM).

Agent Settings Reference

SettingTypeDescription
LLM_providerstring”open ai” or “groq”
LLM_modelstringModel identifier (e.g., “gpt-4o”)
temperaturefloatResponse creativity (0.0 = deterministic, 2.0 = creative)
max_tokensintegerMaximum response length in tokens
system_prompttextAgent instructions and personality
first_messagetextGreeting when call connects

Knowledge Base

Upload documents to your agent for Retrieval-Augmented Generation (RAG):
  1. Go to your agent’s page → Knowledge Base tab
  2. Upload files (PDF, DOCX, TXT)
  3. Enable the RAG toggle
  4. The agent will now search uploaded documents during conversations and use relevant content in responses
Documents are indexed using LlamaIndex with OpenAI embeddings. The index is rebuilt when files are added or removed.

Best Practices

  • Keep system prompts focused — agents perform better with clear, specific instructions
  • Use dynamic variables for personalization: {{customer_name}} and {{account_number}}
  • Test with web calls first — use the dashboard’s Test Call feature before going live with phone calls
  • Set reasonable timeouts — a 5-minute max duration prevents runaway calls
  • Monitor cost per call — different providers have significantly different pricing