Control the call flow from within your agent. End calls gracefully or transfer to a human.
Use SDKAgentEndCallEvent to end the call:
Tools that send SDK events must use await self.send_event() and return None. Simply returning the event object won’t work.
Use SDKAgentTransferConversationEvent to hand off to a human:
When these events trigger, they appear in call logs:
Tell the user before transferring: “I’ll connect you to…”
Faster than warm transfers.
Say goodbye before ending, don’t just hang up.
Have a general transfer number if specific departments unavailable.