Skip to main content
Agent teams combine specialists to tackle complex tasks collaboratively.

Quick Start

1

Create Specialist Agents

use praisonai::Agent;

let researcher = Agent::new()
    .name("Researcher")
    .instructions("Research topics thoroughly")
    .build()?;

let writer = Agent::new()
    .name("Writer")
    .instructions("Write clear, engaging content")
    .build()?;
2

Form a Team

use praisonai::AgentTeam;

let team = AgentTeam::new()
    .agent(researcher)
    .agent(writer)
    .build();

let result = team.run("Write an article about AI").await?;

Team Processes

Choose how agents collaborate:
ProcessBest For
SequentialStep-by-step workflows
ParallelIndependent tasks
HierarchicalComplex delegated work

Sequential Process

use praisonai::{AgentTeam, Process};

let team = AgentTeam::new()
    .agent(researcher)
    .agent(writer)
    .agent(editor)
    .process(Process::Sequential)
    .build();

// Researcher → Writer → Editor

Parallel Process

use praisonai::{AgentTeam, Process};

let team = AgentTeam::new()
    .agent(researcher)
    .agent(fact_checker)
    .process(Process::Parallel)
    .build();

// Researcher + Fact Checker run simultaneously

Hierarchical Process

use praisonai::{AgentTeam, Process};

let team = AgentTeam::new()
    .agent(manager)
    .agent(worker1)
    .agent(worker2)
    .process(Process::Hierarchical)
    .build();

// Manager delegates to workers

Configuration

OptionTypeDefaultDescription
processProcessSequentialHow agents collaborate
verboseboolfalseShow detailed output

Best Practices

Specialists outperform generalists in teams.
When agent B needs agent A’s output, use sequential.
Speed up by running independent agents simultaneously.