***

title: ReceptionistAgent
slug: /reference/typescript/agents/prefabs/receptionist-agent
description: A front-desk agent that handles visitor check-in, department directory lookup, and call transfers by extension.
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

A front-desk agent that handles visitor check-in, department directory lookup, and
call transfers by extension. The `check_in_visitor` tool is enabled by default and
fires an optional callback when a visitor checks in.

```typescript {3}
import { ReceptionistAgent } from '@signalwire/sdk';

const agent = new ReceptionistAgent({ /* ReceptionistConfig */ });
```

## ReceptionistConfig

<ParamField path="companyName" type="string" required={true} toc={true}>
  Company name displayed in greetings and prompts.
</ParamField>

<ParamField path="departments" type="ReceptionistDepartment[]" required={true} toc={true}>
  Departments with extensions for the directory. Each `ReceptionistDepartment` object has:

  * `name` (string, required) -- Department name (e.g., `"Engineering"`).
  * `extension` (string, required) -- Internal extension number or SIP address.
  * `description` (string) -- Optional description of the department.
</ParamField>

<ParamField path="welcomeMessage" type="string" toc={true}>
  Custom welcome message. Defaults to `"Welcome to {companyName}! How may I help you today?"`.
</ParamField>

<ParamField path="checkInEnabled" type="boolean" default="true" toc={true}>
  Whether visitor check-in functionality is enabled. When `true`, the `check_in_visitor` tool is registered.
</ParamField>

<ParamField path="onVisitorCheckIn" type="(visitor: Record<string, string>) => void | Promise<void>" toc={true}>
  Callback fired when a visitor checks in. Receives a record with `visitor_name`, `purpose`,
  `visiting`, and `checked_in_at` fields.
</ParamField>

<ParamField path="name" type="string" default="Receptionist" toc={true}>
  Agent display name.
</ParamField>

<ParamField path="agentOptions" type="Partial<AgentOptions>" toc={true}>
  Additional [`AgentBase`][agentbase] options forwarded to the constructor.
</ParamField>

## Built-in Tools

| Tool                     | Description                                                  | Parameters                                                       |
| ------------------------ | ------------------------------------------------------------ | ---------------------------------------------------------------- |
| `get_department_list`    | List all departments with extensions and descriptions        | (none)                                                           |
| `transfer_to_department` | Transfer the caller to a department by dialing its extension | `department_name` (string)                                       |
| `check_in_visitor`       | Check in a visitor (only when `checkInEnabled` is `true`)    | `visitor_name` (string), `purpose` (string), `visiting` (string) |

<Note>
  The `transfer_to_department` tool uses [`FunctionResult.connect()`][functionresult] to
  dial the department's extension and transfer the call.
</Note>

## Example

```typescript {3}
import { ReceptionistAgent } from '@signalwire/sdk';

const agent = new ReceptionistAgent({
  companyName: 'Acme Corporation',
  departments: [
    { name: 'Sales', extension: '1001', description: 'New orders and pricing' },
    { name: 'Support', extension: '1002', description: 'Technical issues' },
    { name: 'Billing', extension: '1003', description: 'Invoices and payments' },
    { name: 'HR', extension: '1004', description: 'Employment and benefits' },
  ],
  welcomeMessage: 'Thank you for calling Acme Corporation. How may I direct your call?',
  onVisitorCheckIn: (visitor) => {
    console.log(`Visitor checked in: ${visitor.visitor_name} visiting ${visitor.visiting}`);
  },
});

agent.promptAddSection('Company', {
  body: 'You are the receptionist for Acme Corporation.',
});

agent.serve();
```

### createReceptionistAgent

```typescript {3}
import { createReceptionistAgent } from '@signalwire/sdk';

const agent = createReceptionistAgent({
  companyName: 'Acme Corporation',
  departments: [
    { name: 'Sales', extension: '1001', description: 'New orders' },
    { name: 'Support', extension: '1002' },
  ],
});
```