-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Let toolsets be built dynamically based on run context #2366
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
Conversation
eb5e118
to
ea937e9
Compare
@strawgate Thanks! My main concern is that the function taking But in reality it is tied to toolset enters/exits and there's no such guarantee... Those could align with agent runs, but wouldn't if you have your own I want to make sure we don't accidentally introduce a footgun where the behavior will change completely when you add an Maybe we need to add a new hook to toolsets that's only called when a new run/step is actually started, so we don't rely on the enters/exits which could happen at any level? This is all a bit complicated and my analysis here may very well be wrong. Either way I think we'll need tests with different patterns to make sure we get the desired behavior in each case. We should probably chat about this directly, would you mind joining our public Slack so we can huddle? |
@DouweM i added the toolset decorator and added toolsetfunc to agent init, the tests will be passing shortly, I'll play around with this in my poc environment |
2a32aeb
to
2ff5117
Compare
71f3c22
to
26b8364
Compare
26b8364
to
ef55e04
Compare
@DouweM the tests are passing and I've been using this on my fork for a little bit with good success, interested in your thoughts |
@strawgate Thank you, I like the decorator approach a lot. As I mentioned on our call, I want the default behavior to be that it gets rebuilt for every run step, as the presence of the We now have a new The only things missing now is a test to make sure the enter/exit behavior is correct, and docs. |
PR Change SummaryIntroduced a Dynamic Toolset feature that allows toolsets to be built dynamically during an Agent run based on the run context.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
6ce6fc5
to
d49e51a
Compare
2822fae
to
aefbce3
Compare
aefbce3
to
5e0e39b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@strawgate Thanks William, I take it the new implementation has been working well for you?
Yes! I am using it here and here I was mostly testing the |
looks like unrelated test is failing |
@strawgate I made some tweaks to the docs, having this replace the |
Looks great |
@DouweM I feel like after this it makes even more sense for |
@HamzaFarhan For proper type checking of the |
This PR adds a decorator that can be used to dynamically add toolsets to an Agent run similar to how the system prompt and instructions can be added to via decorated functions.