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

# ReceptionistAgent

> A front-desk agent that greets callers, looks up departments, and transfers calls. Optional visitor check-in.

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

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

A front-desk agent that greets callers and transfers them to the correct
department by phone number or SIP address. Visitor check-in is opt-in.

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

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

## ReceptionistConfig

**`departments`** `ReceptionistDepartment[]` — required

Departments the agent can transfer callers to. Each `ReceptionistDepartment`
has:

* `name` (string, required) — department identifier (e.g. `"sales"`).
* `description` (string, required) — description shown to the AI.
* `number` (string, required) — phone number or SIP address dialed by
  `transfer_call`.

---

**`greeting`** `string` — default: "Thank you for calling. How can I help you today?"

Initial greeting spoken when the call starts.

---

**`voice`** `string` — default: "rime.spore"

Voice identifier passed to `addLanguage`.

---

**`companyName`** `string`

Optional company name appended to the greeting.

---

**`checkInEnabled`** `boolean` — default: false

When `true`, registers the `check_in_visitor` tool.

---

**`onVisitorCheckIn`** `(visitor: Record<string, string>) => void | Promise<void>`

Callback fired when a visitor checks in. Receives a record with the fields
collected during check-in.

---

**`name`** `string` — default: "receptionist"

Agent display name.

---

**`route`** `string` — default: "/receptionist"

HTTP route for the agent.

---

**`agentOptions`** `Partial<AgentOptions>`

Additional [`AgentBase`][agentbase] options forwarded to the constructor.

---

## Built-in Tools

| Tool                  | Description                                                                                                               |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `collect_caller_info` | Collect the caller's name and reason for calling; stored in `global_data.caller_info`.                                    |
| `transfer_call`       | Dial a department's number and transfer the caller. The `department` param is an enum of the configured department names. |
| `check_in_visitor`    | Record a visitor check-in (only when `checkInEnabled` is `true`).                                                         |

`transfer_call` uses [`FunctionResult.connect()`][functionresult] to dial the
department's configured `number`.

## Example

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

const agent = new ReceptionistAgent({
  companyName: 'Acme Corporation',
  greeting: 'Thank you for calling Acme Corporation. How may I direct your call?',
  departments: [
    { name: 'sales', description: 'New orders and pricing', number: '+15551001001' },
    { name: 'support', description: 'Technical issues', number: '+15551001002' },
    { name: 'billing', description: 'Invoices and payments', number: '+15551001003' },
  ],
  checkInEnabled: true,
  onVisitorCheckIn: (visitor) => {
    console.log(`Visitor checked in: ${JSON.stringify(visitor)}`);
  },
});

agent.serve();
```

### createReceptionistAgent

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

const agent = createReceptionistAgent({
  departments: [
    { name: 'sales', description: 'Orders', number: '+15551001001' },
  ],
});
```