Skip to navigation

Receptionist

View as MarkdownOpen in Claude

ReceptionistAgent greets callers, collects their information, and transfers them to the appropriate department based on their needs.

Basic Usage

from signalwire.prefabs import ReceptionistAgent
agent = ReceptionistAgent(
departments=[
{
"name": "sales",
"description": "Product inquiries, pricing, and purchasing",
"number": "+15551234567"
},
{
"name": "support",
"description": "Technical help and troubleshooting",
"number": "+15551234568"
},
{
"name": "billing",
"description": "Payment questions and account issues",
"number": "+15551234569"
}
]
)
if __name__ == "__main__":
agent.run()

Department Format

FieldTypeRequiredDescription
namestringYesDepartment identifier (e.g., “sales”)
descriptionstringYesWhat the department handles
numberstringYesPhone number for transfer

Importing ReceptionistAgent

LanguageImport
Pythonfrom signalwire.prefabs import ReceptionistAgent
TypeScriptimport { ReceptionistAgent } from '@signalwire/sdk'

Constructor Parameters

ReceptionistAgent(
departments=[...], # List of department dicts (required)
name="receptionist", # Agent name
route="/receptionist", # HTTP route
greeting="Thank you for calling. How can I help you today?",
voice="rime.spore", # Voice ID
**kwargs # Additional AgentBase arguments
)

Built-in Functions

ReceptionistAgent provides these SWAIG functions automatically:

FunctionDescription
collect_caller_infoCollect caller’s name and reason for calling
transfer_callTransfer to a specific department

Call Flow

Diagram showing the receptionist flow from greeting through caller info collection to department transfer.
Receptionist agent call flow.

Complete Example

#!/usr/bin/env python3
## company_receptionist.py - Custom receptionist agent
from signalwire.prefabs import ReceptionistAgent
agent = ReceptionistAgent(
departments=[
{
"name": "sales",
"description": "New orders, pricing, quotes, and product information",
"number": "+15551001001"
},
{
"name": "support",
"description": "Technical issues, troubleshooting, and product help",
"number": "+15551001002"
},
{
"name": "billing",
"description": "Invoices, payments, refunds, and account questions",
"number": "+15551001003"
},
{
"name": "hr",
"description": "Employment, careers, and benefits",
"number": "+15551001004"
}
],
greeting="Thank you for calling Acme Corporation. How may I direct your call?",
voice="rime.spore",
name="acme-receptionist"
)
## Add custom prompt section
agent.prompt_add_section(
"Company",
"You are the receptionist for Acme Corporation, a leading technology company."
)
if __name__ == "__main__":
agent.run()

Best Practices

Departments

  • Use clear, distinct department names
  • Write descriptions that help AI route correctly
  • Include common reasons in descriptions
  • Verify transfer numbers are correct

Greeting

  • Keep greeting professional and welcoming
  • Include company name if appropriate
  • Ask how to help (prompts caller to state need)

Transfers

  • Always confirm before transferring
  • Use final=True for permanent transfers
  • Test all transfer numbers