registry • AI Agent SDK
Tool registry for managing and discovering tools.
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
Usage:
from praisonaiagents.tools.registry import get_registry
registry = get_registry()
registry.register(my_tool)
tool = registry.get("my_tool")Import
from praisonaiagents.tools import registryClasses
Internal registry entry for a tool with optional dynamic schema override and trust level.
ToolRegistryCentral registry for all tools.
Functions
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.
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.
Constants
| Name | Value |
|---|---|
CANONICAL_ENTRY_POINT_GROUP | 'praisonai.tools' |
_ALIAS_ENTRY_POINT_GROUPS | ('praisonaiagents.tools', 'praisonai.tool_sources') |
ENTRY_POINT_GROUP | 'praisonaiagents.tools' |