KosmoKrator

data

Milvus CLI for AI Agents

Use the Milvus CLI from KosmoKrator to call Milvus tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 5 read 2 write API key auth

Milvus CLI Setup

Milvus can be configured headlessly with `kosmokrator integrations:configure milvus`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure milvus --set api_key="$MILVUS_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor milvus --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key MILVUS_API_KEY Secret secret yes API Key
url MILVUS_URL URL url no Milvus API URL

Call Milvus Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call milvus.milvus_list_collections '{
  "limit": 1,
  "offset": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:milvus milvus_list_collections '{
  "limit": 1,
  "offset": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs milvus --json
kosmo integrations:docs milvus.milvus_list_collections --json
kosmo integrations:schema milvus.milvus_list_collections --json
kosmo integrations:search "Milvus" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Milvus.

milvus.milvus_list_collections

Read read

List all vector collections in Milvus. Returns collection names and details that can be used for further operations.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call milvus.milvus_list_collections '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:milvus milvus_list_collections '{"limit":1,"offset":1}' --json

milvus.milvus_get_collection

Read read

Get details of a specific Milvus collection by its name, including schema and description.

Parameters
collection_name

Generic CLI call

kosmo integrations:call milvus.milvus_get_collection '{"collection_name":"example_collection_name"}' --json

Provider shortcut

kosmo integrations:milvus milvus_get_collection '{"collection_name":"example_collection_name"}' --json

milvus.milvus_create_collection

Write write

Create a new vector collection in Milvus. A collection requires a name and the embedding dimension size.

Parameters
name, dimension, description, params

Generic CLI call

kosmo integrations:call milvus.milvus_create_collection '{"name":"example_name","dimension":1,"description":"example_description","params":"example_params"}' --json

Provider shortcut

kosmo integrations:milvus milvus_create_collection '{"name":"example_name","dimension":1,"description":"example_description","params":"example_params"}' --json

milvus.milvus_insert_documents

Write write

Insert documents with embedding vectors into a Milvus collection. Each document requires a vector and an optional ID.

Parameters
collection_name, data

Generic CLI call

kosmo integrations:call milvus.milvus_insert_documents '{"collection_name":"example_collection_name","data":"example_data"}' --json

Provider shortcut

kosmo integrations:milvus milvus_insert_documents '{"collection_name":"example_collection_name","data":"example_data"}' --json

milvus.milvus_search_documents

Read read

Search for similar documents in a Milvus collection using a query vector. Returns the most similar documents ranked by distance or similarity.

Parameters
collection_name, vector, limit, output_fields, filter

Generic CLI call

kosmo integrations:call milvus.milvus_search_documents '{"collection_name":"example_collection_name","vector":"example_vector","limit":1,"output_fields":"example_output_fields","filter":"example_filter"}' --json

Provider shortcut

kosmo integrations:milvus milvus_search_documents '{"collection_name":"example_collection_name","vector":"example_vector","limit":1,"output_fields":"example_output_fields","filter":"example_filter"}' --json

milvus.milvus_get_collection_stats

Read read

Get statistics for a Milvus collection, including row count and index information.

Parameters
collection_name

Generic CLI call

kosmo integrations:call milvus.milvus_get_collection_stats '{"collection_name":"example_collection_name"}' --json

Provider shortcut

kosmo integrations:milvus milvus_get_collection_stats '{"collection_name":"example_collection_name"}' --json

milvus.milvus_get_health

Read read

Check the health status of the Milvus vector database server. Returns health and version information.

Parameters
none

Generic CLI call

kosmo integrations:call milvus.milvus_get_health '{}' --json

Provider shortcut

kosmo integrations:milvus milvus_get_health '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

milvus.milvus_list_collections

List all vector collections in Milvus. Returns collection names and details that can be used for further operations.

Operation
Read read
Schema command
kosmo integrations:schema milvus.milvus_list_collections --json
ParameterTypeRequiredDescription
limit integer no Maximum number of collections to return (default: 100).
offset integer no Number of collections to skip for pagination.

milvus.milvus_get_collection

Get details of a specific Milvus collection by its name, including schema and description.

Operation
Read read
Schema command
kosmo integrations:schema milvus.milvus_get_collection --json
ParameterTypeRequiredDescription
collection_name string yes The name of the collection.

milvus.milvus_create_collection

Create a new vector collection in Milvus. A collection requires a name and the embedding dimension size.

Operation
Write write
Schema command
kosmo integrations:schema milvus.milvus_create_collection --json
ParameterTypeRequiredDescription
name string yes The name of the collection to create.
dimension integer yes The dimension of the embedding vectors to be stored in this collection.
description string no An optional description of the collection.
params object no Optional collection parameters such as index type and metric type (JSON object).

milvus.milvus_insert_documents

Insert documents with embedding vectors into a Milvus collection. Each document requires a vector and an optional ID.

Operation
Write write
Schema command
kosmo integrations:schema milvus.milvus_insert_documents --json
ParameterTypeRequiredDescription
collection_name string yes The name of the collection to insert into.
data array yes Array of document objects. Each object should contain a "vector" field (array of floats) and optional "id", "color", or other scalar fields.

milvus.milvus_search_documents

Search for similar documents in a Milvus collection using a query vector. Returns the most similar documents ranked by distance or similarity.

Operation
Read read
Schema command
kosmo integrations:schema milvus.milvus_search_documents --json
ParameterTypeRequiredDescription
collection_name string yes The name of the collection to search.
vector array yes The query embedding vector (array of floats).
limit integer no Maximum number of results to return (default: 10).
output_fields array no Fields to include in the response, e.g. ["id", "color", "text"].
filter string no Filter expression for scalar fields, e.g. 'color == "red"'.

milvus.milvus_get_collection_stats

Get statistics for a Milvus collection, including row count and index information.

Operation
Read read
Schema command
kosmo integrations:schema milvus.milvus_get_collection_stats --json
ParameterTypeRequiredDescription
collection_name string yes The name of the collection.

milvus.milvus_get_health

Check the health status of the Milvus vector database server. Returns health and version information.

Operation
Read read
Schema command
kosmo integrations:schema milvus.milvus_get_health --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.