Agents 0.0.2
Edge AI Agents SDK
|
Registry for tools that agents can use. More...
#include <tool_registry.h>
Public Member Functions | |
void | registerTool (std::shared_ptr< Tool > tool) |
Register a tool. | |
std::shared_ptr< Tool > | getTool (const String &name) const |
Get a tool by name. | |
std::vector< std::shared_ptr< Tool > > | getAllTools () const |
Get all registered tools. | |
bool | hasTool (const String &name) const |
Check if a tool is registered. | |
void | removeTool (const String &name) |
Remove a tool. | |
void | clear () |
Clear all tools. | |
JsonObject | getToolSchemas () const |
Get tool schemas as JSON. | |
Static Public Member Functions | |
static ToolRegistry & | global () |
Get the global tool registry. | |
Registry for tools that agents can use.
The ToolRegistry provides a central place to register, retrieve, and manage tools that agents can use.
std::vector< std::shared_ptr< Tool > > agents::tools::ToolRegistry::getAllTools | ( | ) | const |
Get all registered tools.
Get a tool by name.
name | The name of the tool |
JsonObject agents::tools::ToolRegistry::getToolSchemas | ( | ) | const |
Get tool schemas as JSON.
|
static |
Get the global tool registry.
bool agents::tools::ToolRegistry::hasTool | ( | const String & | name | ) | const |
Check if a tool is registered.
name | The name of the tool |
void agents::tools::ToolRegistry::registerTool | ( | std::shared_ptr< Tool > | tool | ) |
Register a tool.
tool | The tool to register |
void agents::tools::ToolRegistry::removeTool | ( | const String & | name | ) |
Remove a tool.
name | The name of the tool |