PersonalAssistantAgent
PersonalAssistantAgent answers the phone for one person, built on
ServiceAgent. It asks who is calling and what it’s about, then rings
the person. The caller hears ringing. When the person answers, they hear a whisper
(“Bo is calling about the contract. Press 1 to take the call.”) and press the accept
key to take it, and the calls are joined. When the joined call ends, the caller’s call
ends too.
If the person doesn’t answer or doesn’t take the call, the assistant carries on with
the caller and offers a message or a time on the calendar, from messages and
appointments. In a chat, nobody is put through.
Parameters
name
The agent’s name.
role
Keyword-only, as are all the parameters below. Who the agent is and how it sounds.
owner
The person’s name, as the assistant says it.
reach
Where the person’s calls go: a phone number in E.164 form, or a SIP address.
available
available(call) returns whether the person is taking calls now. May be async.
When it returns false, the call isn’t put through. None means always.
messages
A Messages pack, to take a message when the person doesn’t take the
call.
appointments
An Appointments pack, for the person’s calendar.
knowledge
An InfoBotKnowledge to answer questions from.
caller_id
The number the put-through call comes from. None shows the caller’s own number to
the person.
ring_seconds
How long to ring the person.
answer_seconds
How long the person has, once they answer, to press the accept key.
whisper_voice
The voice of the whisper. The platform’s default when None.
whisper_language
The whisper’s language code, such as "en-US". The platform’s default when None.
accept_key
The keypad key the person presses to take the call: one of 0-9, *, or #.
Anything else raises ValueError. Any other key, or none, ends the person’s leg.
tool
The put-through tool’s name.
assistant_wording
Replacements for the assistant’s own words, keyed like
PersonalAssistantAgent.WORDING. See wording.
**kwargs
ServiceAgent’s arguments: every Operations keyword argument and
every AgentBase argument.