-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Is your feature request related to a problem? Please describe.
When an Agent reaches max_agent_steps, it stops immediately - even if the last message is from a tool invocation. This results in no final text response from the LLM, which could be problematic if you expect that the agent answers with natural language
Describe the solution you'd like
When max_agent_steps is reached, there could be a setting that the agent:
- Detect if the last message is from a tool call
- Make ONE final call to the chat generator (without tools)
- Return a proper text response
Describe alternatives you've considered
Locally I built a AlwaysAnswerAgent (AAA). My max_agent_steps are low to prevent minute long runs. I want that my agent tells if he has problems with the provided input instead digging for minutes to the wrong result. However when I set max_agent_steps e.g to 10, I receive a tool call output, that I cant display to the user. So I built my AAA that when the threshold is hit, summarizes what he tried so far. So the main goal is to end always with a ChatGenerator/Generator that dont call again tools.