Link Search Menu Expand Document Documentation Menu

List Agentic Search Templates API

Introduced 3.10

This is an experimental feature and is not recommended for use in a production environment. For updates on the progress of the feature or if you want to leave feedback, see the associated GitHub issue.

Use this API to list registered agentic search templates.

Endpoints

GET /_plugins/_ml/agentic_search_templates

Query parameters

The following table lists the available query parameters.

Parameter Data type Required/Optional Description
from Integer Optional The starting index for pagination. Must be non-negative. Default is 0.
size Integer Optional The maximum number of templates to return. Valid values are 1–1000. Default is 10.

Example request

GET /_plugins/_ml/agentic_search_templates?from=0&size=10

Example response

The following response lists a single registered template:

{
  "total": 1,
  "templates": [
    {
      "template_id": "similar_search",
      "index_binding": "products",
      "description": "Fuzzy search for products similar to a name",
      "param_schema": {
        "query_text": {
          "type": "string",
          "required": true,
          "description": "The product name to match. May contain misspellings."
        }
      },
      "created_time": 1792716795385,
      "last_updated_time": 1792716795385
    }
  ]
}

Response body fields

The following table lists all response body fields.

Field Data type Description
total Long The total number of registered templates.
templates Array The templates on the requested page. Each template contains the fields described in Get Agentic Search Template API.

Required permissions

If you use the Security plugin, make sure you have the appropriate permissions: cluster:admin/opensearch/ml/agentic_search_templates/list.

350 characters left

Have a question? .

Want to contribute? or .