Expand description
Tool abstraction and registry.
Implement Tool for callable functions the agent can invoke. Tools declare a JSON Schema
for parameters; the model uses this to generate valid arguments. Use ToolRegistry to
collect and look up tools by name.
Re-exports§
pub use registry::ToolRegistry;pub use retry::ToolRetryPolicy;pub use types::ToolChoice;pub use types::ToolOutput;
Modules§
- registry
- retry
- Self-healing tool retry with configurable backoff.
- types
- Types for tool calls, outputs, and configuration.
Structs§
- Tool
Call - A tool invocation requested by a model, containing the tool name and arguments.
Traits§
- Erased
Tool - Object-safe wrapper for the
Tooltrait, enabling dynamic dispatch viaArc<dyn ErasedTool>. - Tool
- Trait for tools the agent can invoke. Tools must have unique names and declare a JSON Schema for parameters.
Type Aliases§
- Shared
Tool - Shared ownership of a tool via
Arc<dyn ErasedTool>. Used by registry and agent.