Skip to main content

AgentRouter

Trait AgentRouter 

Source
pub trait AgentRouter: Send + Sync {
    // Required method
    fn route(
        &self,
        task: &TaskNode,
        available: &[SubAgentDef],
    ) -> Option<String>;
}
Expand description

Selects the best agent definition for a given task.

Required Methods§

Source

fn route(&self, task: &TaskNode, available: &[SubAgentDef]) -> Option<String>

Choose an agent for the task.

Returns the agent definition name, or None if no suitable agent was found.

Implementors§