Skip to main content

Module tool

Module tool 

Source
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;

Modules§

registry
retry
Self-healing tool retry with configurable backoff (re-exported from daimon_core).
types
Types for tool calls, outputs, and configuration (re-exported from daimon_core).

Structs§

ToolCall
A tool invocation requested by a model, containing the tool name and arguments.
ToolOutput
The result of executing a tool.
ToolRetryPolicy
Policy controlling when and how tool execution is retried on failure.

Enums§

ToolChoice
Controls which tools the model is allowed to use.

Traits§

ErasedTool
Object-safe wrapper for the Tool trait, enabling dynamic dispatch via Arc<dyn ErasedTool>.
Tool
Trait for tools the agent can invoke. Tools must have unique names and declare a JSON Schema for parameters.

Type Aliases§

SharedTool
Shared ownership of a tool via Arc<dyn ErasedTool>. Used by registry and agent.