Hi Agno team, i have a problem when using the tool_call_limit parameters for Agent and Team. I thought the tool call limit only apply to one user request but when i checked the code, seem like the counter that count number of tool called is bind to a model instance which mean for a user with the same session_id / user_id (The model instance not init again) then the counter keep increasing? For long conversation, this behaviour is not really good, i think the tool_call_limit should apply to one request from user or N conversation history.
Hi @son-le
thanks for reaching out and supporting Agno!
We’ve shared this with the team and are working through requests one by one—we’ll get back to you as soon as we can.
We’ve just kicked off the Global Agent Hackathon , so things are a bit busier than usual. If you’re up for it, we’d love for you to join—it’s a great chance to build, win some exciting prizes and connect with the agent community!If it’s urgent, just let us know. Thanks for your patience!
Hi @Monali , thanks for your quick response. Do you have any estimation time for someone to reply this one?
Hey @son-le
Thanks for raising this! I see how it could be useful to have a tool call limit per run, instead of per session. We will consider this a feature request and discuss if it joins our roadmap.
In the meantime, you can achieve the behavior you want by clearing the model’s state between runs. This restarts the function call count, so the tool_call_limit
you are setting would effectively be the limit of each run, not of the full session:
agent.model.clear()