Tools

Introduced 2.12

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:

  1. {
  2. "type": "AgentTool",
  3. "description": "A general agent to answer any question",
  4. "parameters": {
  5. "agent_id": "9X7xWI0Bpc3sThaJdY9i"
  6. }
  7. }

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.

ToolDescription
AgentToolRuns any agent.
CatIndexToolRetrieves index information for the OpenSearch cluster.
IndexMappingToolRetrieves index mapping and setting information for an index.
MLModelToolRuns machine learning models.
NeuralSparseSearchToolPerforms sparse vector retrieval.
PPLToolTranslates natural language into a Piped Processing Language (PPL) query.
RAGToolUses neural search or neural sparse search to retrieve documents and integrates a large language model to summarize the answers.
SearchAlertsToolSearches for alerts.
SearchAnomalyDetectorsToolSearches for anomaly detectors.
SearchAnomalyResultsToolSearches anomaly detection results generated by anomaly detectors.
SearchIndexToolSearches an index using a query written in query domain-specific language (DSL).
SearchMonitorsToolSearches for alerting monitors.
VectorDBToolPerforms dense vector retrieval.
VisualizationToolFinds visualizations in OpenSearch Dashboards.

Developer information

The agents and tools framework is flexible and extensible. You can find the list of tools provided by OpenSearch in the Tools library. For a different use case, you can build your own tool by implementing the Tool interface.