pub trait ToolManager: Send + Sync {
// Required methods
fn resolve_tool_schemas(
&self,
config: &AgentLoopConfig,
session: &Session,
) -> Vec<ToolSchema>;
fn execute_tool_calls<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
tool_calls: &'life1 [ToolCall],
event_tx: &'life2 Sender<AgentEvent>,
metrics_collector: Option<&'life3 MetricsCollector>,
session_id: &'life4 str,
round_id: &'life5 str,
round: usize,
session: &'life6 mut Session,
config: &'life7 AgentLoopConfig,
task_context: &'life8 mut Option<TaskLoopContext>,
tool_schemas: &'life9 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<ToolRoundResult, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait;
}Expand description
Manages tool surface, schemas, routing, execution, and output processing.
Required Methods§
Sourcefn resolve_tool_schemas(
&self,
config: &AgentLoopConfig,
session: &Session,
) -> Vec<ToolSchema>
fn resolve_tool_schemas( &self, config: &AgentLoopConfig, session: &Session, ) -> Vec<ToolSchema>
Resolve available tool schemas for the session.
Sourcefn execute_tool_calls<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
tool_calls: &'life1 [ToolCall],
event_tx: &'life2 Sender<AgentEvent>,
metrics_collector: Option<&'life3 MetricsCollector>,
session_id: &'life4 str,
round_id: &'life5 str,
round: usize,
session: &'life6 mut Session,
config: &'life7 AgentLoopConfig,
task_context: &'life8 mut Option<TaskLoopContext>,
tool_schemas: &'life9 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<ToolRoundResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
fn execute_tool_calls<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
tool_calls: &'life1 [ToolCall],
event_tx: &'life2 Sender<AgentEvent>,
metrics_collector: Option<&'life3 MetricsCollector>,
session_id: &'life4 str,
round_id: &'life5 str,
round: usize,
session: &'life6 mut Session,
config: &'life7 AgentLoopConfig,
task_context: &'life8 mut Option<TaskLoopContext>,
tool_schemas: &'life9 [ToolSchema],
) -> Pin<Box<dyn Future<Output = Result<ToolRoundResult, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
Execute tool calls for a round.