-
Notifications
You must be signed in to change notification settings - Fork 1.6k
'handoffs' and 'agent.as_tool' have different performances. #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Since assistants_agent might handle other sub-tasks and needs to output the results of those sub-tasks, I have to give it control of the conversation. |
Sorry, I just figured out what handoff does, it can solve this problem |
Although I solved this problem, I still want to know why they behave differently. When using 'query_agent.as_tool', the instructions in query_agent do not seem to take effect.
|
Hi @huangbhan, thanks for sharing this — I'm in the same situation. Could you please explain the difference between using Thanks in advance! |
there's great explanation here: https://cookbook.openai.com/examples/orchestrating_agents The basic idea is handoff share the conversional context as the last agent, but tool calls don't. |
hi, I created a
query_agent
that can invoke tools. There is also anassistants_agent
that has control over the conversation.If I use
handoffs = [query_agent]
in theassistants_agent
, it can invoke tools well and pass the correct parameters, but this causes theassistants_agent
to lose control of the conversation.I tried using
tools = [query_agent.as_tool]
in theassistants_agent
, but the performance of invoking tools deteriorated, and the parameters passed were not always correct.Is this normal? How can I solve it?
The text was updated successfully, but these errors were encountered: