Skip to main content

AgentUnderTest

Trait AgentUnderTest 

Source
pub trait AgentUnderTest: Send + Sync {
    // Required methods
    fn run<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        user_message: &'life1 str,
        config: &'life2 AgentConfig,
    ) -> Pin<Box<dyn Future<Output = Result<AgentOutput, SpiceError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn available_tools(&self, config: &AgentConfig) -> Vec<String>;

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

Trait that the agent under test must implement.

Required Methods§

Source

fn run<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_message: &'life1 str, config: &'life2 AgentConfig, ) -> Pin<Box<dyn Future<Output = Result<AgentOutput, SpiceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Run the agent with a user message and config, return full output with trace.

Source

fn available_tools(&self, config: &AgentConfig) -> Vec<String>

Return tool names available for this config (for allowlist assertions).

Provided Methods§

Source

fn name(&self) -> &str

Human-readable agent name (for reports).

Implementors§