ConciergeAgent

View as MarkdownOpen in Claude

A concierge that provides multi-department routing with a knowledge base of department info, hours of operation, and call transfer capabilities.

1import { ConciergeAgent } from '@signalwire/sdk';
2
3const agent = new ConciergeAgent({ /* ConciergeConfig */ });

ConciergeConfig

departments
Department[]Required

List of departments available for routing. Each Department object has:

  • name (string, required) — Department name (e.g., "Sales").
  • description (string, required) — What this department handles.
  • transferNumber (string) — Phone number or SIP address for transfers.
  • keywords (string[]) — Keywords that help route callers to this department.
  • hoursOfOperation (string) — Human-readable hours (e.g., "Mon-Fri 9am-5pm EST").
companyName
stringDefaults to our company

Company name used in greetings and prompts.

generalInfo
string

General company information the agent can share with callers.

afterHoursMessage
stringDefaults to This department is currently closed. Please try again during business hours.

Message spoken when a department is closed or has no transfer number.

name
stringDefaults to Concierge

Agent display name.

agentOptions
Partial<AgentOptions>

Additional AgentBase options forwarded to the constructor.

Built-in Tools

ToolDescriptionParameters
list_departmentsList all departments with descriptions and hours(none)
get_department_infoGet detailed info about a specific departmentdepartment_name (string)
transfer_to_departmentTransfer the caller to a department via its transfer numberdepartment_name (string)

The transfer_to_department tool uses FunctionResult.connect() to transfer the call. If the department has no transferNumber, the agent returns the afterHoursMessage instead.

Example

1import { ConciergeAgent } from '@signalwire/sdk';
2
3const agent = new ConciergeAgent({
4 companyName: 'Riverside Resort',
5 generalInfo: 'A luxury resort on the riverfront with 200 rooms.',
6 departments: [
7 {
8 name: 'Front Desk',
9 description: 'Check-in, check-out, and room inquiries',
10 transferNumber: '+15551001001',
11 hoursOfOperation: '24 hours',
12 keywords: ['room', 'reservation', 'check-in'],
13 },
14 {
15 name: 'Spa',
16 description: 'Spa treatments and wellness appointments',
17 transferNumber: '+15551001002',
18 hoursOfOperation: '9 AM - 9 PM',
19 keywords: ['massage', 'facial', 'wellness'],
20 },
21 {
22 name: 'Restaurant',
23 description: 'Dining reservations and room service',
24 transferNumber: '+15551001003',
25 hoursOfOperation: '7 AM - 10 PM',
26 },
27 ],
28 afterHoursMessage: 'This department is currently closed. Please call back during business hours.',
29});
30
31agent.serve();

createConciergeAgent

1import { createConciergeAgent } from '@signalwire/sdk';
2
3const agent = createConciergeAgent({
4 companyName: 'Riverside Resort',
5 departments: [
6 { name: 'Front Desk', description: 'Room inquiries', transferNumber: '+15551001001' },
7 ],
8});