Tools
Introduced 2.13
A tool performs a set of specific tasks. The following table lists all tools that OpenSearch supports.
Specify a tool by providing its type, parameters, and, optionally, a description. For example, you can specify an AgentTool as follows:
{
"type": "AgentTool",
"description": "A general agent to answer any question",
"parameters": {
"agent_id": "9X7xWI0Bpc3sThaJdY9i"
}
}
Each tool takes a list of parameters specific to that tool. In the preceding example, the AgentTool takes an agent_id of the agent it will run. For a list of parameters, see each tool’s documentation.
You can also run tools directly without creating an agent using the Execute Tool API, which is useful for testing individual tools or performing standalone operations.
| Tool | Description |
|---|---|
AgentTool | Runs any agent. |
ConnectorTool | Uses a connector to call any REST API function. |
CreateAnomalyDetectorTool | Enables an LLM to suggest required parameters for creating an anomaly detector. |
DataDistributionTool | Analyzes data distribution patterns within datasets and compares distributions between different time periods. |
IndexMappingTool | Retrieves index mapping and setting information for an index. |
ListIndexTool | Retrieves index information for the OpenSearch cluster. Introduced in OpenSearch version 3.0 as a replacement for the CatIndexTool. |
LogPatternAnalysisTool | Performs advanced log analysis by detecting exceptional log patterns and sequences through comparative analysis. |
LogPatternTool | Analyzes log data to extract and identify recurring structural patterns across log messages. |
MLModelTool | Runs machine learning models. |
NeuralSparseSearchTool | Performs sparse vector retrieval. |
PPLTool | Translates natural language into a Piped Processing Language (PPL) query. |
QueryPlanningTool | Creates and executes an OpenSearch DSL query based on a user’s natural language question. |
RAGTool | Uses neural search or neural sparse search to retrieve documents and integrates a large language model to summarize the answers. |
ReadFromScratchPadTool | Reads notes and information from an agent’s temporary scratchpad memory during execution. |
SearchAlertsTool | Searches for alerts. |
SearchAnomalyDetectorsTool | Searches for anomaly detectors. |
SearchAnomalyResultsTool | Searches anomaly detection results generated by anomaly detectors. |
SearchIndexTool | Searches an index using a query written in query domain-specific language (DSL). |
SearchMonitorsTool | Searches for alerting monitors. |
VectorDBTool | Performs dense vector retrieval. |
VisualizationTool | Finds visualizations in OpenSearch Dashboards. |
WebSearchTool | Answers a user’s question using a web search. |
WriteToScratchPadTool | Writes notes and information to an agent’s temporary scratchpad memory during execution. |
Developer information
The agents and tools framework offers flexibility and extensibility. See the tools library for OpenSearch-provided tools. Implement the Tool interface to build custom tools for different use cases.