How to stop an event loop cycle during an agent run? #117
Unanswered
patrickpenn
asked this question in
Q&A
Replies: 1 comment
-
The approach you're taking is appropriate right now. You can use the same mechanism to track tool calls. We're actively looking at how to better suppose this in a composable manner. #191 is an issue tracking limits - implementation-wise we expect to introduce something like "hooks" which would allow you to hook into lifecycle to do things like count tool calls and use that to stop the loop as needed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the SDK i have seen the ability to use the stop tool to force stop an agent to run. But i need to stop an agent after let`s say three tries of a search within a db with different queries.
The only way i have found is to use a callback handler a do something like this:
Is this the right approach?
Is there also the ability to count cycle per tool use? This might help the model to stop one tool use after some tries but keep on with further tool calls
best
Patrick.
Beta Was this translation helpful? Give feedback.
All reactions