Tools getting called sequentially

I've noticed that sometimes our tools are getting called sequentially when running an agent inside a workflow step, and I'm unsure why this is. We're really trying to cut down on latency and this is a big blocker. In the cases where we run tools sequentially, in our datadog traces, I see multiple workflow.agentic-loop.step.executionWorkflow with each calling a tool (see screenshot). In cases where the same agent runs the tools in parallel, I see a single workflow.agentic-loop.step.executionWorkflow that calls multiple tools (workflow.executionWorkflow.step.toolCallStep). I was hoping there was a flag I could set to force parallel tool calls within my workflow step. I know maxSteps is an option on an agent, but it defaults to 1 anyways so that probably isn't it. Any advice here would be amazing!
No description
3 Replies
Mastra Triager
GitHub
[DISCORD:1424167189132345439] Tools getting called sequentially · ...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1424167189132345439 I've noticed that sometimes our tools are getting called sequentially when running...
_roamin_
_roamin_3w ago
Hi @seb7wake ! Unfortunately, it is the LLM who decides if it wants to call several tools at once or not. You could try guiding the agent in your system instructions, telling it to execute tool calls in parallel whenever possible
seb7wake
seb7wakeOP3w ago
Ah, too bad

Did you find this page helpful?