Optimize task execution with parallel tool calls
mainTo maximize efficiency, Worker Agents should prioritize parallel execution of independent operations. Instead of executing tools sequentially, batch them into a single request when the operations do not depend on each other.
Guidelines for Parallelism:
- Batch similar operations: If a task requires searching for multiple terms (e.g., searching for 'home', 'address', and 'apartment' in Gmail), execute all searches simultaneously in one batch.
- Execute independent reads in parallel: If you need to read multiple files or check multiple sources, do them all at once.
- When to use sequential calls: Only use sequential execution when the output of one tool is strictly required as the input for the next tool.
Example Pattern:
If requested to find an address via email, do not call gmail_fetch_emails_compact three times in a row. Instead, issue three tool calls in a single parallel batch.