Handover and voicemail work with Prompt and Playbook brains. A
Runner or Endpoint brain answers turns itself, so the platform has no
way to call these tools for it - transfer from a runner with
ctx.session.transfer_to_human() instead.How tool settings are saved
All tool settings live in onetools dict on the agent, and
agents.update(tools=...) replaces the whole dict. Sending only
{"handover": ...} removes a voicemail message you set earlier.
So always read, change, and write back:
Transfer to a human
When the caller asks for a person - “let me talk to your manager” - the agent calls the handover tool, dials your number, and connects the caller.handover.py
Output
Warm vs cold
In warm mode, silence counts as no: after
decision_timeout_s with no
clear answer, the caller goes back to the agent. The call ends when the
caller hangs up, and the transcript covers the whole conversation.
Turn handover off
Before you test it
- The agent needs a number attached - the handover places a real outbound call from it.
- Tell the brain when to hand over. In a Prompt brain, add a line such as “If the caller asks for a human or a manager, transfer the call.”
- A number with a wrong format is rejected when you save (
422), not mid-call.
Test on a real call
- Place a call to yourself with
calls.create()(see the Quickstart). - Say “Put me through to a human.”
- The first handover number rings. In warm mode, answer and say “yes” after the briefing.
Voicemail message
Voicemail detection is always on. When the agent reaches an answering machine it leaves one message and hangs up, so the call does not sit on the voicemail box and keep billing. Set the message the agent leaves:voicemail.py
end_reason="AGENT_HUNG_UP_VOICEMAIL_DETECTED", so you
can filter these calls when you read results.
Automatic follow-up calls
If a caller says “call me back tomorrow at 5”, the platform can schedule that callback on its own. It takes three steps, done once per agent:- Create a follow-up analytics block from the built-in
follow_uptemplate. After every call it decides whether a callback was asked for and when. - Attach the block to the agent.
- Turn on
automatic_followup_enabledon the agent. Without this the recommendation is still saved, but nothing is dialled.
followup.py
What happens after a call
- The call ends and the follow-up block runs on its transcript.
- If the caller asked for a callback, the result has
automatically_schedule=Trueand afollow_up_attime. - The platform creates a new call with
status="scheduled"at that time. Itsinitial_call_idpoints back to the original call.
Next steps
Configure an agent
Voice, number, background sound, noise cancellation.
Analytics
Blocks, field specs, and reading results.
Domain dictionaries
Fix misheard product names.