• PROVISION
  • INSPECT
  • AUDIT
  • HUMAN

How to provision and manage k-NN indexes with your AI

Connect OpenSearch Vector to your AI client to automate vector index setup. Once connected, your agent handles the heavy lifting of index lifecycle management.

Ask AI about this page

Short answer

How can I automate k-NN index management with AI?

Your AI uses specific tools to build new vector indexes, list existing ones, or pull detailed metadata for a specific index. This allows you to align your vector storage with your embedding dimensions through natural language commands. You'll get precise control over your OpenSearch vector environment.

Index outcomes.

Where your data lands.

The AI handles the technical execution of these three core tasks.

PROVISION

New vector indexes

The AI builds a new index with the exact dimensions you need. You get a ready-to-use k-NN structure without writing JSON templates.

INSPECT

Index metadata

Your agent pulls the configuration and settings for a specific index. This helps you verify that dimensions and algorithms match your embeddings.

AUDIT

Full index list

The AI scans your OpenSearch environment to show every available index. You can quickly see what's currently active in your cluster.

HUMAN

Manual adjustments

The AI cannot modify existing index settings or delete data. You'll need to handle index deletions or mapping changes through the OpenSearch console.

The workflow

What your AI does when <the thing arrives>.

Your agent acts as a bridge between your natural language requests and the OpenSearch API.

  1. Identify requirements

    The AI parses your request to determine the required dimensions and index name.

    list_indexes
  2. Build the index

    The agent executes the creation process to set up the k-NN vector space.

    create_index
  3. Verify state

    The AI checks the cluster to see what indexes are already present.

    list_indexes
  4. Confirm configuration

    The agent retrieves the specific settings of the newly created or existing index.

    get_index

Try it

Copy these to start.

Use these prompts to trigger index actions immediately.

Starting points

Swap out the index names and dimension counts to match your actual data.

OpenSearch Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_6R4dQ885yexHhsyH4M5e8fLiT1BjuMlzaUlJMumQ/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — OpenSearch capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "opensearch-vector-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_6R4dQ885yexHhsyH4M5e8fLiT1BjuMlzaUlJMumQ/mcp"
    }
  }
}
Copy into chat04
  • Create a new k-NN index named 'user_embeddings' with 1536 dimensions.

  • List all the vector indexes currently in my OpenSearch cluster.

  • Get the configuration details for the 'product_vectors' index.

  • Check if an index for 'document_search' already exists.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect OpenSearch Vector once, then ask.

One connection gives your agent direct access to your OpenSearch cluster. All credentials stay encrypted and secure on our side.

Connect OpenSearch Vector to your AI

FAQ

How this task behaves.

  • 01

    Can the AI delete an index if I ask it to?

    No. The AI only has tools to create, list, and get index information. Deletion must be done manually.

  • 02

    Can the AI change the dimensions of an existing index?

    No. The AI can only create new indexes. It cannot modify the settings of an index once it is provisioned.

  • 03

    Does the AI handle the actual vector data insertion?

    No. This connector manages the index structure and metadata. You still need to push your actual embedding vectors to the index using your own data pipeline.

  • 04

    How does the AI know which dimensions to use?

    You specify the dimensions in your prompt, and the AI uses that information to call the creation tool.

  • 05

    Can I see all my indexes at once?

    Yes. You can ask the AI to list all indexes to get a full overview of your cluster.

  • More questions about OpenSearch Vector? The Connector page answers them. See everything the OpenSearch Vector Connector can do

Connect OpenSearch to Claude, Cursor, ChatGPT & more