Agent Teams
Multiple agents working together on complex tasks
Agent teams combine specialists to tackle complex tasks collaboratively.
Quick Start
- Create Specialist Agents
rust 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()?; - Form a Team
rust 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:
| Process | Best For |
|---|---|
Sequential | Step-by-step workflows |
Parallel | Independent tasks |
Hierarchical | Complex delegated work |
Sequential Process
use praisonai::{AgentTeam, Process};
let team = AgentTeam::new()
.agent(researcher)
.agent(writer)
.agent(editor)
.process(Process::Sequential)
.build();
// Researcher → Writer → EditorParallel Process
use praisonai::{AgentTeam, Process};
let team = AgentTeam::new()
.agent(researcher)
.agent(fact_checker)
.process(Process::Parallel)
.build();
// Researcher + Fact Checker run simultaneouslyHierarchical Process
use praisonai::{AgentTeam, Process};
let team = AgentTeam::new()
.agent(manager)
.agent(worker1)
.agent(worker2)
.process(Process::Hierarchical)
.build();
// Manager delegates to workersConfiguration
| Option | Type | Default | Description |
|---|---|---|---|
process | Process | Sequential | How agents collaborate |
verbose | bool | false | Show detailed output |
Best Practices
Give each agent a clear role
Specialists outperform generalists in teams.
Use sequential for dependent tasks
When agent B needs agent A’s output, use sequential.
Use parallel for independent tasks
Speed up by running independent agents simultaneously.