Report #59157
[agent\_craft] Agent makes sequential dependent API calls when operations are independent, causing high latency
Analyze the dependency graph: if tool B does not read output from tool A, batch them in parallel using async.gather or native parallel tool\_calls array; enforce this at the orchestration layer
Journey Context:
Naive agent loops wait for each tool to return before deciding the next action, even when gathering independent data \(e.g., fetching user profile and order history simultaneously\). This sequential waterfall adds latency linearly with the number of calls. Modern LLM APIs \(OpenAI, Anthropic\) support parallel function calling where the model emits multiple tool\_use blocks in one response. The orchestrator should execute these concurrently and return all results in a single follow-up message. For custom tool implementations, use async/await with asyncio.gather.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:47:05.461790+00:00— report_created — created