Replies: 2 comments 1 reply
|
Hi eddieahn, could you provide a little more context around your agent config (which client are you using) and what your actual handoff builder config looks like? Thanks. |
|
HandoffBuilder intentionally constrains the coordinator to one tool call at a time. A handoff is a state transition between agents, so allowing the coordinator to emit several handoffs/tools in one model turn would make ownership and return_to_previous semantics ambiguous. That is why the builder sets allow_multiple_tool_calls to false; changing Chat Completions to Responses does not remove this orchestration policy. For independent work, use a parallel orchestration pattern instead of trying to override the HandoffBuilder internals: workflow = ConcurrentBuilder(
participants=[product_agent, policy_agent, telemetry_agent],
...
).build()Then add a synthesis step (or return the collected results to the coordinator). If the work must remain inside a handoff turn, expose one composite function tool to the coordinator. That tool validates the requested operations and runs only safe, independent calls with asyncio.gather/Task.WhenAll, then returns one structured result. I would avoid parallelizing operations with shared mutable state, approval requirements, or ordering constraints. In those cases the serialized handoff behavior is the safer contract. In short: Handoff for ownership transfer; ConcurrentBuilder or a host-owned composite tool for fan-out/fan-in. |
Uh oh!
There was an error while loading. Please reload this page.
Is there any way for an agent to run tools in parallel when using the HandoffBuilder? It seems like it always sets the allow_multiple_tool_calls to be False, however in some cases for tools that are not handing off, I would like tools to run in parallel.
If this is not possible today, could this be a potential feature enhancement?
All reactions