registry
AI Agent Tool registry for managing and discovering tools. This module provides centralized tool management with support for:- Manual registration
- Auto-discovery via entry_points
- Tool lookup by name
- Thread-safe operations for multi-agent scenarios
Import
Classes
ToolEntry
Internal registry entry for a tool with optional dynamic schema override and trust level.
ToolRegistry
Central registry for all tools.
Functions
get_registry()
Get the global tool registry instance. Thread-safe singleton.
register_tool()
Convenience function to register a tool with the global registry.
get_tool()
Convenience function to get a tool from the global registry.
add_tool()
Register a tool. Simplified alias for register_tool().
has_tool()
Check if a tool is registered in the global registry.
remove_tool()
Remove a tool from the global registry.
list_tools()
List all registered tool names.
get_tool_definitions()
Get OpenAI-compatible tool definitions with dynamic schema overrides applied.
discover_plugins()
Discover and load tools from single-file plugins.
list_available_tools()
List only currently available tools from the global registry.
list_tools_with_allowed_filter()
List tool names filtered by ALLOWED_TOOLS from the global registry.
list_tools_with_hermes_filter()
Backward compatibility alias for list_tools_with_allowed_filter.

