Parallel Execution
Run multiple agents simultaneously
Run agents in parallel for faster results on independent tasks.
Quick Start
- Parallel Agents
rust use praisonai::parallel; let results = parallel([ researcher.chat("Research topic A"), researcher.chat("Research topic B"), researcher.chat("Research topic C"), ]).await?; // All three run simultaneously - Parallel Teams
rust use praisonai::{AgentTeam, Process}; let team = AgentTeam::new() .agent(researcher) .agent(analyst) .agent(writer) .process(Process::Parallel) .build(); // All agents work simultaneously
When to Use Parallel
| Task Type | Use Parallel? |
|---|---|
| Research 3 topics | ✅ Yes |
| Translate to 5 languages | ✅ Yes |
| Write then edit | ❌ No |
| Research then summarize | ❌ No |
Best Practices
Only parallelize independent tasks
If task B needs task A’s output, use sequential.
Watch API rate limits
Parallel calls may hit rate limits faster.