Skip to main content

Crate traitclaw_team

Crate traitclaw_team 

Source
Expand description

Multi-agent orchestration for the TraitClaw AI agent framework.

Provides Team structs for composing agents, Router protocol for message routing, delegation between agents, and VerificationChain for generate-then-verify patterns.

§Quick Start

use traitclaw_team::{AgentRole, Team, VerificationChain, VerifyResult};
use traitclaw_team::router::SequentialRouter;

let team = Team::new("research_team")
    .add_role(AgentRole::new("researcher", "Research topics in depth"))
    .add_role(AgentRole::new("writer", "Write clear summaries"));

assert_eq!(team.name(), "research_team");
assert_eq!(team.roles().len(), 2);

Re-exports§

pub use conditional_router::ConditionalRouter;
pub use execution::run_verification_chain;
pub use execution::TeamRunner;
pub use team_context::TeamContext;

Modules§

conditional_router
ConditionalRouter — content-based routing using regex patterns.
execution
Team execution engine — Team.bind() and Team.run().
group_chat
Multi-agent group chat with configurable turn-taking and termination.
router
Router — pluggable multi-agent message routing.
team_context
Shared TeamContext — thread-safe inter-agent state store.

Structs§

AgentRole
A role within a team — describes what an agent specializes in.
Team
A team of agents working together.
VerificationChain
A verification chain: generate with one agent, verify with another.

Enums§

VerifyResult
Result of a verification step.

Functions§

pool_from_team
Create an AgentPool from a Team and a provider.
pool_from_team_arc
Create an AgentPool from a Team using a pre-wrapped Arc<dyn Provider>.