Skip to main content

parallel_handoffs

AsyncFunction
This function is defined in the handoff module.
Execute multiple handoffs in parallel with concurrency control. This function provides the parallel execution capabilities from SubagentDelegator while using the unified Handoff system.

Signature

Parameters

Agent
required
Source agent performing the handoffs
List[tuple]
required
List of (agent, prompt) tuples for parallel execution
int
default:"5"
Maximum concurrent handoffs (overrides config)
Optional[HandoffConfig]
Optional HandoffConfig for additional settings

Returns

List['HandoffResult']
List of HandoffResult objects from each parallel handoff

Usage

Uses

  • ValueError
  • asyncio.Semaphore
  • source.handoff_to_async
  • logger.error
  • HandoffResult
  • asyncio.gather

Source

View on GitHub

praisonaiagents/agent/handoff.py at line 1182

Handoffs Concept

Handoffs Feature