Tool Registry • AI Agent SDK
ToolRegistry: Central registry for all tools.
ToolRegistry
Defined in the registry module.
AI Agent
Central registry for all tools.
Provides:
- Tool registration (manual and auto-discovery)
- Tool lookup by name
- Tool listing and filtering
- Entry points discovery for external plugins
- Trust level management for security
Constructor
boolNo description available.
Methods
Register a tool with the registry.
unregister()Remove a tool from the registry.
get()Get a tool by name.
list_tools()List all registered tool names. Thread-safe.
list_base_tools()List all registered BaseTool instances. Thread-safe.
get_tool_definitions()Get OpenAI-compatible tool definitions with dynamic schema overrides applied.
get_tool_definition()Get the effective OpenAI-compatible definition for one registered name.
list_available_tools()List only currently available tools (those that pass availability checks).
list_tools_with_allowed_filter()List tool names filtered by ALLOWED_TOOLS environment variable.
get_all()Get all registered tools as a dict. Thread-safe.
discover_plugins()Discover and register tools from entry_points.
discover_single_file_plugins()Discover and load tools from single-file plugins.
get_trust_level()Get the trust level for a tool.
clear()Clear all registered tools. Thread-safe.
Source
View on GitHubpraisonaiagents/tools/registry.py at line 92