Agent Team • Rust AI Agent SDK

AgentTeam: Agent team for multi-agent workflows Coordinates multiple agents to work together on tasks.

AgentTeam

Defined in the workflows module.

Rust AI Agent SDK

Agent team for multi-agent workflows Coordinates multiple agents to work together on tasks.

Diagram

Input Data

Agent: AgentTeam

Output Result

Fields

NameTypeDescription
agentsVec<Arc<Agent>>–
processProcess–
verbosebool–

Methods

is_verbose

rust
fn is_verbose(&self) -> bool

Check if verbose mode is enabled

new

rust
fn new() -> AgentTeamBuilder

Create a new agent team builder

start

rust
async fn start(&self, task: &str) -> Result<String>

Run the team with a task

Parameters:

NameType
task&str

run

rust
async fn run(&self, task: &str) -> Result<String>

Alias for start

Parameters:

NameType
task&str

len

rust
fn len(&self) -> usize

Get the number of agents

is_empty

rust
fn is_empty(&self) -> bool

Check if empty

Usage

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

let result = team.start("Research and write about AI").await?;

Source

View on GitHub

praisonai/src/workflows/mod.rs at line 116


Related Documentation