Skip to main content

AgentTeam

Defined in the workflows module.
Rust AI Agent SDK Agent team for multi-agent workflows Coordinates multiple agents to work together on tasks.

Fields

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

Methods

is_verbose

fn is_verbose(&self) -> bool
Check if verbose mode is enabled

new

fn new() -> AgentTeamBuilder
Create a new agent team builder

start

async fn start(&self, task: &str) -> Result<String>
Run the team with a task Parameters:
NameType
task&str

run

async fn run(&self, task: &str) -> Result<String>
Alias for start Parameters:
NameType
task&str

len

fn len(&self) -> usize
Get the number of agents

is_empty

fn is_empty(&self) -> bool
Check if empty

Usage

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

Rust Agent

Rust Overview

Rust Quickstart

Rust Installation

Rust Autonomy