pub async fn spawn_agents_with_limit(
configs: impl IntoIterator<Item = SpawnConfig>,
concurrency: usize,
event_tx: Sender<AgentEvent>,
) -> Vec<Result<AgentResult, Error>>Expand description
Spawn multiple agents with bounded concurrency
Unlike spawning all agents at once, this limits how many agent processes run simultaneously to prevent system resource exhaustion.
§Arguments
configs- Iterator of spawn configurationsconcurrency- Maximum number of concurrent agent processesevent_tx- Channel for receiving agent events
§Returns
Vector of agent results after all agents complete