-
Notifications
You must be signed in to change notification settings - Fork 1.6k
How to dynamically add/remove tools in a tool_use_behavior="run_llm_again"
-loop
#767
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
This is a good question. I'll have to think of a long term good answer, but the short term hack is: just add the tools in the
|
Thanks @rm-openai , unfortunately, it seems that extending the tools isn't enough reason to refresh the openai-agents-python/src/agents/run.py Line 518 in 6e078bf
run_llm_again loop (or I tested it wrong, ofc also possible).
Any other ideas? |
@Afstkla I have a system with dynamic agents. I mean users define their agents by entering instructions, settings handoffs, and assigning tools from a predefined set of tools. I fetch the agents config of the user when a request arrives to my backend and dynamically create agents and run them. This system works well so far. The problem occurs where more than one tool need to be executed in order. Let me give me an example. Let's say we have two tools one for creating a discount code ( Is the any official way of doing what I desire? Or should we workaround this manually? Also if there is no official way, I think there should be because then developers can create strong atomic tools and users may achieve an infinite amount of different things using a this small set if tools. The current system don't allow this. What do you think @rm-openai? |
Please read this first
Question
I'm building an agent that's often running multiple tool calls sequentially, and sometimes tool
A
will 'unlock' toolsB
,C
, andD
. But I so far haven't found a way to 'inject' those during an automatedrun_llm_again
loop. And I'm really dreading writing all the logic required to manually handle the run loop.I've attempted using the
Hooks
to dynamically add new tools, I've been trying to work with various differentAgent
s as tools, where the tools of thoseAgent
s are added dynamically through the hooks. The only thing that's semi worked for me is to use thehandoff
feature, but then I can't give control back to the 'main' agent.My agent's flow will normally be like:
Runner
startsRunner
exitsBut this is a workflow that I can't currently figure out. Is there a way?
The text was updated successfully, but these errors were encountered: