Expand description
Tool registry and agents for LLM function calling.
This module provides infrastructure for registering, managing, and invoking tools that can be called by LLMs. It includes:
- A global tool registry for registering and looking up tools by name
- The
Tooltrait for implementing custom tools - Agents for working with tools in workflows:
ListToolsAgent- Lists available tools matching a patternPresetToolAgent- Exposes a workflow as a callable toolCallToolMessageAgent- Processes tool calls from LLM messagesCallToolAgent- Directly invokes a tool by name
Structs§
- Call
Tool Agent - Agent that directly invokes a tool by name.
- Call
Tool Message Agent - Agent that processes tool calls from LLM messages.
- List
Tools Agent - Agent that lists available tools.
- Preset
Tool Agent - Agent that exposes a workflow as a callable tool.
- Tool
Info - Metadata describing a tool available for LLM function calling.
Traits§
- Tool
- Trait for implementing callable tools.
Functions§
- call_
tool - Invokes a tool by name with the given arguments.
- call_
tools - Executes multiple tool calls and returns the results as messages.
- get_
tool - Retrieves a tool by name from the global registry.
- list_
tool_ infos - Returns information about all registered tools.
- list_
tool_ infos_ patterns - Returns tool information for tools matching the given regex patterns.
- register_
tool - Registers a tool with the global registry.
- unregister_
tool - Removes a tool from the global registry by name.