Skip to main content

Voice Agents

Voice agents are the core of the Hanc.AI platform — AI-powered virtual assistants that handle phone conversations with your customers. This section covers everything you need to know about creating, configuring, and managing voice agents.

What is a Voice Agent?

A voice agent is an AI program that:

  • Answers phone calls automatically, 24/7
  • Understands speech in natural language
  • Responds with voice using natural-sounding speech
  • Follows your instructions defined in the prompt
  • Uses your information from the knowledge base
  • Performs actions like booking appointments or transferring calls

Agent Architecture

┌─────────────────────────────────────────────────────────────────┐
│ VOICE AGENT │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ PROMPT │ │ KNOWLEDGE BASE │ │
│ │ (Behavior) │ │ (Information) │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ └──────────┬───────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ AI ENGINE │ │
│ │ (LLM Processing) │ │
│ └─────────────────────┘ │
│ │ │
│ ┌──────────┴──────────┐ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ VOICE │ │ TOOLS │ │
│ │ (TTS/STT) │ │ (Actions) │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

Creating an Agent

From the Dashboard

  1. Navigate to Voice Agents in the sidebar
  2. Click "Create voice agent"
  3. Choose a template or start from scratch
  4. Configure basic settings
  5. Save and test

Available Templates

TemplateUse CaseIncludes
Customer ServiceGeneral support, FAQsFriendly prompt, escalation rules
Appointment BookingSchedulingCalendar integration, availability check
SalesLead qualificationProduct info, qualifying questions
ReceptionCall routingDepartment identification, transfers
CustomAny purposeEmpty configuration

Agent Configuration

Basic Information

FieldDescriptionExample
NameInternal identifier"Main Reception"
DescriptionPurpose of the agent"Handles all incoming calls"
StatusActive or inactiveActive

Model Settings

The AI "brain" configuration:

First Message

The greeting when the agent answers:

Hello! Thank you for calling ABC Company. How can I assist you today?

Best practices:

  • Keep under 10 seconds when spoken
  • State your company name
  • Invite the caller to speak
  • Sound welcoming

Agent Prompt

Instructions defining agent behavior. See Prompt Engineering for detailed guidance.

Knowledge Base

Connect information sources. See Knowledge Base section.

Settings Tab

Configure agent behavior in the Settings tab:

SettingDescription
LanguageInitial greeting language (agent adapts to caller's language)
VoiceVoice selection (gender, tone, style)
End call after silenceAuto-end call if no response
End-Call timeout (sec)Seconds of silence before ending
Reminder timeout (sec)Time before repeating last message
Max remindersHow many times to repeat before ending
Sentiment analysisTrack caller mood (positive/neutral/negative)
Call summaryGenerate summary with key phrases after call

Language

Primary communication language for the greeting. The agent will:

  • Start in this language
  • Automatically switch to the caller's language
  • Understand multiple languages

Voice Selection

Choose from available voices with different:

  • Genders (male/female)
  • Tones (professional, friendly, calm)
  • Styles and accents

Tip: Match voice to your brand:

  • Professional services → Calm, mature voice
  • Youth brands → Energetic, younger voice
  • Healthcare → Warm, reassuring voice

Agent Tools

Tools extend what your agent can do beyond conversation. Access via the Tools tab in agent settings.

Available Tools

ToolPurposeConfiguration
Call ForwardingTransfer to human operatorName, forwarding number, trigger condition
Book AppointmentSchedule via Cal.comAPI key, Event ID, SMS confirmation option
API Tool RAGReal-time external dataEndpoint URL, headers, body schema, timeout

Call Forwarding

Transfer calls to a human when specific conditions are met:

SettingDescription
NameName of the person/department
Forwarding NumberPhone number to transfer to
Global ConditionWhen to trigger (e.g., "customer asks for manager")

Book Appointment (Cal.com)

Schedule appointments using Cal.com calendar integration:

SettingDescription
NameScheduler name
General ConditionWhen to offer booking
API KeyYour Cal.com API key
Event IDCal.com event identifier
Book an appointmentIf disabled, only checks availability
ConfirmationNo confirmation / SMS confirmation

API Tool RAG

Connect to external APIs for real-time information:

SettingDescription
NameTool name
General ConditionWhen to query the API
Execution MessageWhat agent says while waiting for response
API Endpoint URLExternal API endpoint
Method/Headers/BodyRequest configuration
Request TimeoutMaximum wait time

Agent Actions

Actions allow your agent to perform tasks based on conversation data. Access via the Actions tab.

Retrieval Variables

Define custom variables that the AI extracts from conversations:

Variable TypeExample Use
TextCustomer name, email, notes
NumberQuantity, budget, phone number
BooleanYes/no responses
SelectorChoice from predefined options

Each variable needs:

  • Name: Variable identifier
  • Description: Instructions for the AI on when/how to extract this value

Available Actions

ActionPurposeKey Settings
Send EmailEmail data after callRecipients, subject, message template
Send SMSText message with dataRecipients, message template
API CallSend data to external APIEndpoint, method, headers, body

Send Email Action

SettingDescription
NameAction identifier
SubjectEmail subject line
MessageContent (can include extracted variables)
ConditionWhen to send (leave empty = always)
Recipient Email(s)One or more email addresses

Send SMS Action

Same as email, without subject line.

API Call Action

SettingDescription
NameAction identifier
ConditionWhen to trigger
API Endpoint URLWhere to send data
Method/Headers/BodyRequest configuration

Website Widgets

Embed your agent on any website. Access via the Widgets tab.

Floating Widget

A button that floats on your page (usually bottom-right corner):

<script src="https://widget.hanc.ai/floating.js" agent-id="YOUR_AGENT_ID"></script>
  • Appears as a floating call button
  • Exists outside your page layout
  • Visitors click to start voice conversation

Inline Widget

Embeds directly into your page content:

<script src="https://widget.hanc.ai/inline.js" agent-id="YOUR_AGENT_ID"></script>
  • Integrates into your page layout
  • Can be placed anywhere in your content
  • Good for dedicated "Talk to Us" sections
Finding Your Agent ID

Copy your Agent ID from the Overview tab → Quick ActionsCopy AgentID


Testing Agents

Quick Actions (Overview Tab)

ActionDescription
Talk to agentTest via browser (WebRTC) - no phone needed
DemoOpen demo page for sharing
Call AgentGet phone numbers to test via real call
Copy AgentIDCopy agent identifier

Browser Test (Talk to agent)

  1. Click "Talk to agent" in Quick Actions
  2. Allow microphone access in your browser
  3. Wait for agent greeting
  4. Speak naturally and test scenarios
  5. Click end call when done

Test Scenarios

Run through these scenarios:

ScenarioWhat to SayExpected Result
Greeting(Just listen)Agent greets appropriately
Simple question"What are your hours?"Correct business hours
Service inquiry"What services do you offer?"Service list
Booking"I'd like to book an appointment"Booking flow starts
Unknown topic"What's the weather?"Polite deflection
Frustration(Sound annoyed)Empathetic response
Transfer request"I want to speak to a human"Transfer initiated

Test Call Logs

After testing, review:

  • Full transcript
  • Response times
  • Any errors or issues
  • Sentiment analysis

Managing Multiple Agents

When to Use Multiple Agents

ScenarioRecommendation
Different departmentsSeparate agents (Sales, Support, Billing)
Different languagesSeparate agents per language
Different brandsSeparate agents per brand
Simple businessOne agent handles everything

Agent Organization

Use clear naming conventions:

[Department] - [Function] - [Language]

Examples:
- Sales - Inbound - EN
- Support - Tier 1 - DE
- Reception - Main - EN

Agent Analytics

Track agent performance:

Key Metrics

MetricDescriptionGood Target
Call VolumeNumber of calls handledDepends on business
Avg DurationAverage call length2-5 minutes typical
Resolution RateCalls completed without transferAbove 70%
SentimentCustomer satisfactionAbove 70% positive
Escalation RateCalls transferred to humanBelow 30%

Viewing Analytics

  1. Go to Dashboard for overview
  2. Click specific agent for detailed stats
  3. Use Call Logs for individual call analysis

Best Practices

Do's

✅ Keep prompts clear and specific ✅ Test thoroughly before deploying ✅ Update knowledge base regularly ✅ Monitor call logs for issues ✅ Iterate based on real conversations ✅ Set appropriate escalation triggers

Don'ts

❌ Make prompts too long or complex ❌ Deploy without testing ❌ Ignore negative sentiment patterns ❌ Let knowledge base become outdated ❌ Promise capabilities the agent doesn't have ❌ Skip escalation paths


Guides in This Section