pub trait Agent: Send + Sync {
// Required methods
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
context: &'life2 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn system_prompt(&self) -> String;
fn agent_type(&self) -> AgentType;
}Expand description
Base trait for all agents
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
context: &'life2 AgentContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + 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<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the agent with given input and context
Sourcefn system_prompt(&self) -> String
fn system_prompt(&self) -> String
Get the agent’s system prompt
Sourcefn agent_type(&self) -> AgentType
fn agent_type(&self) -> AgentType
Get the agent type