pub struct RouterAgent { /* private fields */ }Expand description
Router agent that directs queries to specialized agents.
Uses an LLM to analyze user queries and determine which specialized agent is best suited to handle them.
Implementations§
Trait Implementations§
Source§impl Agent for RouterAgent
impl Agent for RouterAgent
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_context: &'life2 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<AgentResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 str,
_context: &'life2 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<AgentResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the agent with given input and context
Source§fn system_prompt(&self) -> String
fn system_prompt(&self) -> String
Get the agent’s system prompt
Source§fn agent_type(&self) -> AgentType
fn agent_type(&self) -> AgentType
Get the agent type
Auto Trait Implementations§
impl !RefUnwindSafe for RouterAgent
impl !UnwindSafe for RouterAgent
impl Freeze for RouterAgent
impl Send for RouterAgent
impl Sync for RouterAgent
impl Unpin for RouterAgent
impl UnsafeUnpin for RouterAgent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more