Skip to main content
Run agents in parallel for faster results on independent tasks.

Quick Start

1

Parallel Agents

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
2

Parallel Teams

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 TypeUse Parallel?
Research 3 topics✅ Yes
Translate to 5 languages✅ Yes
Write then edit❌ No
Research then summarize❌ No

Best Practices

If task B needs task A’s output, use sequential.
Parallel calls may hit rate limits faster.