Description
Hi,
I’m running into a problem with multi-agent handoff and slot filling using OpenAI Agents (function calling, multi-agent orchestration).
Scenario:
I have a main agent and a rental car agent.
When a user asks about rental car reservation, the main agent hands off to the rental car agent.
The rental car agent needs both location and date to make a reservation, so it asks the user for the location first (slot-filling).
The user then provides the location.
Problem:
After the user provides the location, the conversation does not continue with the rental car agent.
Instead, the main agent answers directly (without handing the turn to the rental car agent again), so the slot-filling flow is broken.
Questions:
Is multi-turn slot filling with agent handoff/stateful continuation fully supported in the current OpenAI Agents framework?
Is there a recommended way to ensure that follow-up questions (for slot-filling) keep being routed to the correct agent?
Are there any best practices or configuration changes I should try for this use case?
Thanks for any suggestions or workarounds.
Activity
hanil-jihun commentedon May 22, 2025
I’ve seen some discussions and got this response from GPT about how OpenAI Agents interpret history:
If you provide the full message structure (such as the output from to_input_list), OpenAI will use the metadata (function call, tool output, status, etc.) in the history to determine that the previous agent session has already been completed or handled.
Because of this, the next user message is treated as the start of a new, single-agent session, instead of continuing with the specialized agent.
In particular, if there is a tool/function output message included, the system may internally interpret the agent’s task as finished, so additional user input gets routed back to the default agent rather than staying with the specialized agent.
If anyone has experience with this or additional insight, please feel free to comment.
Any suggestions, explanations, or best practices would be greatly appreciated.
Kalai9976 commentedon May 26, 2025
When you are trying to handoff instead on having only one agent - if you have more agents handoff are working as expect - If you mention only one agent in handoffs the agent itself throw the output
Kalai9976 commentedon May 26, 2025
Try having some dummy agent in place and run the same. might help
hanil-jihun commentedon May 27, 2025
I've tried making two more agents but it is not working
github-actions commentedon Jun 3, 2025
This issue is stale because it has been open for 7 days with no activity.
github-actions commentedon Jun 7, 2025
This issue was closed because it has been inactive for 3 days since being marked as stale.