Skip to main content

Module registry

Module registry 

Source
Available on crate feature async only.
Expand description

ToolRegistry and the FnTool closure adapter.

The registry holds heterogeneous Tool implementations behind Arc<dyn Tool> and supports two registration shapes:

Both reduce to the same Arc<dyn Tool>, so the agent loop runner (#20) and the model’s tool list (ToolRegistry::to_messages_tools) treat them identically.

Structs§

FnTool
Internal adapter: wraps a closure and exposes it through the Tool trait. Created by ToolRegistry::register and ToolRegistry::register_described.
ToolRegistry
In-memory registry of tools keyed by name.