KosmoKrator

data

Chroma CLI for AI Agents

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

Chroma CLI Setup

Chroma can be configured headlessly with `kosmokrator integrations:configure chroma`.

Install, configure, and verify
# 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 chroma --enable --read allow --write ask --json
kosmokrator integrations:doctor chroma --json
kosmokrator integrations:status --json

Credentials

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

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call chroma.chroma_get_health '{}' --json
Provider shortcut
kosmo integrations:chroma chroma_get_health '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs chroma --json
kosmo integrations:docs chroma.chroma_get_health --json
kosmo integrations:schema chroma.chroma_get_health --json
kosmo integrations:search "Chroma" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

chroma.chroma_get_health

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

Read read
Parameters
none
Generic call
kosmo integrations:call chroma.chroma_get_health '{}' --json
Shortcut
kosmo integrations:chroma chroma_get_health '{}' --json

chroma.chroma_list_collections

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

Read read
Parameters
limit, offset
Generic call
kosmo integrations:call chroma.chroma_list_collections '{"limit":1,"offset":1}' --json
Shortcut
kosmo integrations:chroma chroma_list_collections '{"limit":1,"offset":1}' --json

chroma.chroma_count_collections

Count vector collections in the configured Chroma tenant/database.

Read read
Parameters
none
Generic call
kosmo integrations:call chroma.chroma_count_collections '{}' --json
Shortcut
kosmo integrations:chroma chroma_count_collections '{}' --json

chroma.chroma_get_collection

Get details of a specific Chroma collection by its name or UUID, including metadata and document count.

Read read
Parameters
collection_id
Generic call
kosmo integrations:call chroma.chroma_get_collection '{"collection_id":"example_collection_id"}' --json
Shortcut
kosmo integrations:chroma chroma_get_collection '{"collection_id":"example_collection_id"}' --json

chroma.chroma_create_collection

Create a new vector collection in Chroma. Collections are used to store and query document embeddings.

Write write
Parameters
name, metadata, configuration
Generic call
kosmo integrations:call chroma.chroma_create_collection '{"name":"example_name","metadata":"example_metadata","configuration":"example_configuration"}' --json
Shortcut
kosmo integrations:chroma chroma_create_collection '{"name":"example_name","metadata":"example_metadata","configuration":"example_configuration"}' --json

chroma.chroma_update_collection

Update collection name, metadata, or configuration.

Write write
Parameters
collection_id, new_name, metadata, configuration
Generic call
kosmo integrations:call chroma.chroma_update_collection '{"collection_id":"example_collection_id","new_name":"example_new_name","metadata":"example_metadata","configuration":"example_configuration"}' --json
Shortcut
kosmo integrations:chroma chroma_update_collection '{"collection_id":"example_collection_id","new_name":"example_new_name","metadata":"example_metadata","configuration":"example_configuration"}' --json

chroma.chroma_delete_collection

Delete a collection and all records in it.

Write write
Parameters
collection_id
Generic call
kosmo integrations:call chroma.chroma_delete_collection '{"collection_id":"example_collection_id"}' --json
Shortcut
kosmo integrations:chroma chroma_delete_collection '{"collection_id":"example_collection_id"}' --json

chroma.chroma_add_documents

Add documents with embeddings to a Chroma collection. Each document requires an ID and either embeddings or text content.

Write write
Parameters
collection_id, ids, embeddings, documents, metadatas, uris
Generic call
kosmo integrations:call chroma.chroma_add_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json
Shortcut
kosmo integrations:chroma chroma_add_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json

chroma.chroma_update_documents

Update existing records in a Chroma collection.

Write write
Parameters
collection_id, ids, embeddings, documents, metadatas, uris
Generic call
kosmo integrations:call chroma.chroma_update_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json
Shortcut
kosmo integrations:chroma chroma_update_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json

chroma.chroma_upsert_documents

Upsert records in a Chroma collection.

Write write
Parameters
collection_id, ids, embeddings, documents, metadatas, uris
Generic call
kosmo integrations:call chroma.chroma_upsert_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json
Shortcut
kosmo integrations:chroma chroma_upsert_documents '{"collection_id":"example_collection_id","ids":"example_ids","embeddings":"example_embeddings","documents":"example_documents","metadatas":"example_metadatas","uris":"example_uris"}' --json

chroma.chroma_delete_documents

Delete records from a collection by IDs or metadata filters.

Write write
Parameters
collection_id, ids, where, where_document, limit
Generic call
kosmo integrations:call chroma.chroma_delete_documents '{"collection_id":"example_collection_id","ids":"example_ids","where":"example_where","where_document":"example_where_document","limit":1}' --json
Shortcut
kosmo integrations:chroma chroma_delete_documents '{"collection_id":"example_collection_id","ids":"example_ids","where":"example_where","where_document":"example_where_document","limit":1}' --json

chroma.chroma_count_documents

Count records in a Chroma collection.

Read read
Parameters
collection_id
Generic call
kosmo integrations:call chroma.chroma_count_documents '{"collection_id":"example_collection_id"}' --json
Shortcut
kosmo integrations:chroma chroma_count_documents '{"collection_id":"example_collection_id"}' --json

chroma.chroma_query_documents

Search for similar documents in a Chroma collection using query embeddings or text. Returns the most similar documents ranked by distance.

Read read
Parameters
collection_id, query_embeddings, query_texts, query_uris, ids, n_results, where, where_document, include
Generic call
kosmo integrations:call chroma.chroma_query_documents '{"collection_id":"example_collection_id","query_embeddings":"example_query_embeddings","query_texts":"example_query_texts","query_uris":"example_query_uris","ids":"example_ids","n_results":1,"where":"example_where","where_document":"example_where_document"}' --json
Shortcut
kosmo integrations:chroma chroma_query_documents '{"collection_id":"example_collection_id","query_embeddings":"example_query_embeddings","query_texts":"example_query_texts","query_uris":"example_query_uris","ids":"example_ids","n_results":1,"where":"example_where","where_document":"example_where_document"}' --json

chroma.chroma_get_document

Retrieve specific documents from a Chroma collection by their IDs. Returns the full documents including text, embeddings, and metadata.

Read read
Parameters
collection_id, ids, where, where_document, include, limit, offset
Generic call
kosmo integrations:call chroma.chroma_get_document '{"collection_id":"example_collection_id","ids":"example_ids","where":"example_where","where_document":"example_where_document","include":"example_include","limit":1,"offset":1}' --json
Shortcut
kosmo integrations:chroma chroma_get_document '{"collection_id":"example_collection_id","ids":"example_ids","where":"example_where","where_document":"example_where_document","include":"example_include","limit":1,"offset":1}' --json

Function Schemas

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

chroma.chroma_get_health 0 parameters
Schema command
kosmo integrations:schema chroma.chroma_get_health --json
ParameterTypeRequiredDescription
No parameters.
chroma.chroma_list_collections 2 parameters
Schema command
kosmo integrations:schema chroma.chroma_list_collections --json
ParameterTypeRequiredDescription
limit integer no Maximum number of collections to return (default: 100).
offset integer no Offset for pagination.
chroma.chroma_count_collections 0 parameters
Schema command
kosmo integrations:schema chroma.chroma_count_collections --json
ParameterTypeRequiredDescription
No parameters.
chroma.chroma_get_collection 1 parameters
Schema command
kosmo integrations:schema chroma.chroma_get_collection --json
ParameterTypeRequiredDescription
collection_id string yes The collection name or UUID.
chroma.chroma_create_collection 3 parameters
Schema command
kosmo integrations:schema chroma.chroma_create_collection --json
ParameterTypeRequiredDescription
name string yes The name of the collection to create.
metadata object no Optional metadata to attach to the collection (JSON object with string values).
configuration object no Optional Chroma index configuration.
chroma.chroma_update_collection 4 parameters
Schema command
kosmo integrations:schema chroma.chroma_update_collection --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
new_name string no Optional new collection name.
metadata object no Optional replacement metadata.
configuration object no Optional replacement index configuration.
chroma.chroma_delete_collection 1 parameters
Schema command
kosmo integrations:schema chroma.chroma_delete_collection --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
chroma.chroma_add_documents 6 parameters
Schema command
kosmo integrations:schema chroma.chroma_add_documents --json
ParameterTypeRequiredDescription
collection_id string yes The collection name or UUID to add documents to.
ids array yes Array of unique document IDs (strings).
embeddings array no Array of embedding vectors. Each embedding is an array of floats. Required if no documents text provided.
documents array no Array of text documents. Chroma will generate embeddings if no embeddings are provided.
metadatas array no Array of metadata objects (one per document) with string values.
uris array no Optional URI strings associated with each record.
chroma.chroma_update_documents 6 parameters
Schema command
kosmo integrations:schema chroma.chroma_update_documents --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
ids array yes Record IDs to update.
embeddings array no Updated embedding vectors.
documents array no Updated document strings.
metadatas array no Updated metadata objects.
uris array no Updated URI strings.
chroma.chroma_upsert_documents 6 parameters
Schema command
kosmo integrations:schema chroma.chroma_upsert_documents --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
ids array yes Record IDs to upsert.
embeddings array yes Embedding vectors for each record.
documents array no Optional document strings.
metadatas array no Optional metadata objects.
uris array no Optional URI strings.
chroma.chroma_delete_documents 5 parameters
Schema command
kosmo integrations:schema chroma.chroma_delete_documents --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
ids array no Record IDs to delete.
where object no Metadata filter.
where_document object no Document content filter.
limit integer no Optional maximum records to delete.
chroma.chroma_count_documents 1 parameters
Schema command
kosmo integrations:schema chroma.chroma_count_documents --json
ParameterTypeRequiredDescription
collection_id string yes Collection UUID or name.
chroma.chroma_query_documents 9 parameters
Schema command
kosmo integrations:schema chroma.chroma_query_documents --json
ParameterTypeRequiredDescription
collection_id string yes The collection name or UUID to query.
query_embeddings array no Array of query embedding vectors. Each embedding is an array of floats.
query_texts array no Array of query text strings. Chroma will generate embeddings automatically.
query_uris array no Array of query URI strings.
ids array no Optional record IDs to constrain the search to.
n_results integer no Number of results to return per query (default: 10).
where string no JSON-encoded filter expression for metadata filtering, e.g. {"category": "tech"}.
where_document string no JSON-encoded filter on document content, e.g. {"$contains": "search term"}.
include array no Fields to include in response: documents, embeddings, metadatas, distances. Default: ["documents", "metadatas", "distances"].
chroma.chroma_get_document 7 parameters
Schema command
kosmo integrations:schema chroma.chroma_get_document --json
ParameterTypeRequiredDescription
collection_id string yes The collection name or UUID.
ids array no Array of document IDs to retrieve.
where string no JSON-encoded metadata filter, e.g. {"category": "tech"}.
where_document string no JSON-encoded document content filter, e.g. {"$contains": "search term"}.
include array no Fields to include: documents, embeddings, metadatas. Default: ["documents", "metadatas"].
limit integer no Maximum number of documents to return (default: 100).
offset integer no Number of documents to skip for pagination.

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.