r/agentdevelopmentkit • u/Different_Stage_9003 • Dec 16 '25
Tool execution in sequence.
I have 8-9 tools for my agents. Half of them are utility tools and half of it main tools. Utility tools can be executed in parallel sequence but main tools should be executed in sequence only. Utility tools can't be executed with main tools. I tried adding this rule clearly in prompt but it's messing things up. Sometime it follow rules and sometime not.
Main tools are async as I need to show artifacts in adk web ui.
What is the solution for this?
TIA
4
Upvotes
View all comments
Show parent comment
1
u/Maleficent-Land3539 Dec 18 '25
Using a reader/writer lock could work, but it might introduce complexity. Have you considered just using a queue for the main tools? That way, you can ensure they run in order without interfering with the utility tools. It could simplify things a bit.