|
Agents 1.6.9
Edge AI Agents SDK
|
Web search tool backed by the Brave Search API. More...
#include <brave_search_tool.h>
Public Member Functions | |
| ToolResult | execute (const JsonObject ¶ms) const override |
| Execute the tool with the given parameters. | |
| const std::string & | getName () const |
| Get the name of the tool. | |
| const std::string & | getDescription () const |
| Get the description of the tool. | |
| const ParameterMap & | getParameters () const |
| Get the parameters of the tool. | |
| const JsonObject & | getSchema () const |
| Get the schema of the tool. | |
| void | addParameter (const Parameter ¶m) |
| Add a parameter to the tool. | |
| void | addParametersFromJson (const JsonObject ¶ms) |
| Add tool parameters from json definition. | |
| void | setCallback (ToolCallback callback) |
| Set the execution callback. | |
| virtual double | scoreRelevance (const std::string &query) const |
| Score the relevance of this tool to a given query. | |
| bool | validateParameters (const JsonObject ¶ms) const |
| Validate parameters against schema. | |
Web search tool backed by the Brave Search API.
Significantly faster than SerpAPI — direct index, single HTTP round-trip, no intermediate proxy. Set WEBSEARCH_API_KEY to your Brave API key.
|
inherited |
Add a parameter to the tool.
| param | The parameter to add |
|
inherited |
Add tool parameters from json definition.
| params | The parameters to add |
|
overridevirtual |
Execute the tool with the given parameters.
| params | The parameters to execute the tool with |
Reimplemented from agents::Tool.
|
inherited |
Get the description of the tool.
|
inherited |
Get the name of the tool.
|
inherited |
Get the parameters of the tool.
|
inherited |
Get the schema of the tool.
|
virtualinherited |
Score the relevance of this tool to a given query.
| query | The query to score against |
Reimplemented in agents::skills::MarkdownSkillTool.
|
inherited |
Set the execution callback.
| callback | The callback to set |
|
inherited |
Validate parameters against schema.
| params | The parameters to validate |