Module auto_forest

Module auto_forest 

Source
Expand description

AutoForest - Automatic orchestration of agent forests for complex tasks.

§AutoForest Module

This module implements automatic orchestration of a forest of agents. Given a high-level task, the AutoForest orchestrator intelligently:

  • Determines the optimal number of agents to spawn
  • Generates specialized prompts for each agent
  • Distributes available tools among agents
  • Coordinates task execution and result aggregation

§Example

use helios_engine::{AutoForest, Config, CalculatorTool};

#[tokio::main]
async fn main() -> helios_engine::Result<()> {
    let config = Config::new_default();
     
    let mut auto_forest = AutoForest::new(config)
        .with_tools(vec![Box::new(CalculatorTool)])
        .build()
        .await?;

    let task = "Analyze sales data and identify trends";
    let result = auto_forest.execute_task(task).await?;
    println!("Result: {}", result);
    Ok(())
}

Structs§

AgentConfig
Configuration for an agent spawned by the orchestrator
AutoForest
The AutoForest orchestrator - manages automatic agent spawning and coordination
AutoForestBuilder
Builder for AutoForest
OrchestrationPlan
Orchestration plan generated for a task
SpawnedAgent
An auto-spawned agent with its assigned configuration