FrontDeskAgent
FrontDeskAgent is a business’s front desk, built on ServiceAgent.
It puts callers through to the department they ask for while that department takes
calls, books appointments, takes messages, and answers from documents, each when you
give it the matching part.
The departments become a transfer_to_human tool with a to argument listing the
department names. The tool runs as soon as the caller names a department, without
first asking whether they want a person. An open department is reached with a
permanent connect transfer (final=True), so the call leaves the agent. A closed
department, or a request from a chat, is refused, and the model offers a message when
there’s a Messages pack.
Parameters
name
The agent’s name.
role
Keyword-only, as are all the parameters below. Who the agent is and how it sounds. Becomes the prompt’s Role section.
departments
Where callers can be put through to, keyed by the name callers use for each.
appointments
An Appointments pack, to book appointments.
messages
A Messages pack, to take messages and to offer one when a department
isn’t taking calls.
knowledge
An InfoBotKnowledge to answer from the business’s documents. Offered
before the caller is identified.
caller_id
The number calls put through come from. The platform’s default when None.
desk_wording
Replacements for the desk’s own words, keyed like FrontDeskAgent.WORDING. See
wording.
**kwargs
ServiceAgent’s arguments: every Operations keyword argument
(rules, wording, currency, medium, and the rest) and every AgentBase
argument.
Department
Department(description, to, open=None) is a frozen dataclass for one place the desk
puts callers through to.
Department.description
What callers go to it for, as the model reads it: “questions about a bill”.
Department.to
Where the call goes: a phone number in E.164 form, or a SIP address.
Department.open
open(call) returns whether the department takes calls now. May be async. None
means always.