-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Question
I'm having this issue which I think leads to a very detrimental end-user experiences. Just happened to two potential clients who were demoing interactions with an agent system based on the OpenAI Realtime API.
There is a 'customer_service_agent' who hands off to a 'delivery form agent', the latter of who specializes in taking a delivery via a structured form-like conversation. The interaction right around the handoff goes like so:
Agent CustomerServiceAgent started.
10:55:35
role='user' transcript='Yeah, I'd like to get more details from someone.'
10:55:35
Agent handoff from: CustomerServiceAgent to: DeliveryFormAgent
10:55:35
message='type='function_call' status='completed' name='transfer_to_deliveryformagent' arguments={} output=Handed off to DeliveryFormAgent'
10:55:35
Agent DeliveryFormAgent ended.
10:55:35
Agent DeliveryFormAgent started.
10:55:37
role='assistant' transcript='I’ll connect you with someone who can assist further. Thanks for reaching out!'
10:55:37
Agent DeliveryFormAgent ended.
I attempted to circumnavigate this by doing so in the backend:
elif event.type == "handoff":
logging.info(f"Agent handoff from: {event.from_agent.name} to: {event.to_agent.name}")
self._persist_conversation_line(f"Agent handoff from: {event.from_agent.name} to: {event.to_agent.name}")
self.session.send_message("Greet the caller and ask to begin form collection process.")
I don't think the last statement of getting the forms-agent to instigate its own task works (or at least reliably). Most of the item, the handoff has happened but there's just an audio that says 'I’ll connect you with someone who can assist further. Thanks for reaching out' and then there is silence.
If the caller prompts that he/she would like to proceed, of course, the forms agent does the intended task. But new users are not going to know about this, and they often wind up hanging up because the agent has gone silent.
I don't know if there's a good workaround for this. Feel like there should be an easy workaround, but still shooting in the dark.