Skip to main content

ToolRegistry

Trait ToolRegistry 

Source
pub trait ToolRegistry: Send + Sync {
    // Required method
    fn resolve(&self, tool_name: &str) -> Option<Arc<dyn Tool>>;

    // Provided method
    fn available_tools(&self) -> Vec<String> { ... }
}
Expand description

Core traits and types.

Always available regardless of feature flags. Includes:

  • Agent - The fundamental trait for all agents
  • Tool / Toolset - For extending agents with capabilities
  • Session / State - For managing conversation context
  • Event - For streaming agent responses
  • AdkError / Result - Unified error handling A registry that maps tool names to concrete tool instances.

Implementations resolve string identifiers (e.g. from a skill or config) into executable Arc<dyn Tool> instances.

Required Methods§

Source

fn resolve(&self, tool_name: &str) -> Option<Arc<dyn Tool>>

Resolve a tool name to a concrete tool instance. Returns None if the tool is not available in this registry.

Provided Methods§

Source

fn available_tools(&self) -> Vec<String>

Returns a list of all tool names available in this registry.

Implementors§