Skip to main content
Three things an agent can do beyond talking:
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 one tools 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:
Every example below follows this pattern.

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

  1. Place a call to yourself with calls.create() (see the Quickstart).
  2. Say “Put me through to a human.”
  3. 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
Without a message the agent says: “Sorry I missed you. I will call back later. Thank you.” The call ends with 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:
  1. Create a follow-up analytics block from the built-in follow_up template. After every call it decides whether a callback was asked for and when.
  2. Attach the block to the agent.
  3. Turn on automatic_followup_enabled on the agent. Without this the recommendation is still saved, but nothing is dialled.
followup.py
Run this before the calls you want covered - analytics blocks run on new calls only and never backfill.

What happens after a call

  1. The call ends and the follow-up block runs on its transcript.
  2. If the caller asked for a callback, the result has automatically_schedule=True and a follow_up_at time.
  3. The platform creates a new call with status="scheduled" at that time. Its initial_call_id points back to the original call.
Read the decision and the scheduled call:
To review callbacks before they are dialled, leave automatic_followup_enabled off: the block still records who asked for a callback and when, and your team can act on the results table instead.
To stop automatic callbacks:

Next steps

Configure an agent

Voice, number, background sound, noise cancellation.

Analytics

Blocks, field specs, and reading results.

Domain dictionaries

Fix misheard product names.