I am using tool call using Action Calling Feature and set a Call Condition as below.
My Tool Call Action is hit 3 times and after that it should return response to the user but instead I am getting an exception and getting following message.
Can any one know how I can set condition that my Action calling will stop after 2 times and get a result based on 2nd response of the Action (Tool).
I think you misunderstand the main part. Max Token is the only thing that can let the agent response with a success. In your case, its Call Condition that will throw an error when the expression = TRUE
Hi,
Not an expert on the Agent Workbench, but should the condition not be different like:
TotalCallsCount <= 2
Regards,
Daniel
I changed the condition but still the same issue.
No, @Daniël Kuhlmann , its opposite. The call condition is to stop the agent loop when the condition is TRUE, so the >2 is correct one
Hi @Navneet Garg , the call condition will throw the exception when it is true. So you should set the actions output more specific to let the agent stop with the appropriate content output instead
@Navneet Garg if you set a condition for the max tools calls it will throw an exception and error out. You need to handle that in the code.
The Max Tool Calls will always throw an exception.
If you want to limit the number of tool calls and still get an output you may have to implement a work around. A better approach may be to Limit max tokens as it may have a similar impact but might give you a valid output.
Hope this helps.
Find the link for reference: https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/build_ai_powered_apps/agentic_apps_in_odc/ai_agent_actions/
Yes, I already checked it and it says
The agent concludes its reasoning loop when it meets a Call Condition. The agent then generates a final response to the user based on the information gathered up to that point.
But in my case the agent is not generating final result and giving me the exception.
All conditions except for Max tokens will throw an exception and error out. Only in the case of Max tokens you will get an output.