KosmoKrator

other

Weaviate CLI for AI Agents

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

7 functions 5 read 2 write API key auth

Weaviate CLI Setup

Weaviate can be configured headlessly with `kosmokrator integrations:configure weaviate`.

# 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 weaviate --enable --read allow --write ask --json
kosmokrator integrations:doctor weaviate --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 WEAVIATE_API_KEY Secret secret no API Key
url WEAVIATE_URL URL url no Weaviate URL

Call Weaviate Headlessly

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

kosmo integrations:call weaviate.weaviate_list_schemas '{}' --json

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

kosmo integrations:weaviate weaviate_list_schemas '{}' --json

Agent Discovery Commands

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

kosmo integrations:docs weaviate --json
kosmo integrations:docs weaviate.weaviate_list_schemas --json
kosmo integrations:schema weaviate.weaviate_list_schemas --json
kosmo integrations:search "Weaviate" --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 Weaviate.

weaviate.weaviate_list_schemas

Read read

List all schemas (collections/classes) defined in the Weaviate instance. Returns the full schema including all classes and their properties.

Parameters
none

Generic CLI call

kosmo integrations:call weaviate.weaviate_list_schemas '{}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_list_schemas '{}' --json

weaviate.weaviate_get_schema

Read read

Get the schema definition for a specific class (collection) in Weaviate. Returns the class name, properties, vectorizer config, and module settings.

Parameters
class_name

Generic CLI call

kosmo integrations:call weaviate.weaviate_get_schema '{"class_name":"example_class_name"}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_get_schema '{"class_name":"example_class_name"}' --json

weaviate.weaviate_create_class

Write write

Create a new class (collection) in the Weaviate schema. Provide a class definition with the class name and an array of property definitions (name, dataType, etc.).

Parameters
class

Generic CLI call

kosmo integrations:call weaviate.weaviate_create_class '{"class":"example_class"}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_create_class '{"class":"example_class"}' --json

weaviate.weaviate_search_objects

Read read

Search and query objects in Weaviate using GraphQL. Supports Get, Aggregate, and Explore queries with filters, sorting, and vector/nearVector/nearText search.

Parameters
query

Generic CLI call

kosmo integrations:call weaviate.weaviate_search_objects '{"query":"example_query"}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_search_objects '{"query":"example_query"}' --json

weaviate.weaviate_create_object

Write write

Create a new data object in a Weaviate class. Provide the class name and a properties object with the data fields. Optionally specify a UUID for the object.

Parameters
class, properties, id

Generic CLI call

kosmo integrations:call weaviate.weaviate_create_object '{"class":"example_class","properties":"example_properties","id":"example_id"}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_create_object '{"class":"example_class","properties":"example_properties","id":"example_id"}' --json

weaviate.weaviate_get_object

Read read

Retrieve a specific data object from Weaviate by its class name and UUID. Returns the full object including all properties and metadata.

Parameters
class_name, id

Generic CLI call

kosmo integrations:call weaviate.weaviate_get_object '{"class_name":"example_class_name","id":"example_id"}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_get_object '{"class_name":"example_class_name","id":"example_id"}' --json

weaviate.weaviate_get_health

Read read

Check the health and liveness of the Weaviate instance. Returns a status indicating whether the service is alive and responsive.

Parameters
none

Generic CLI call

kosmo integrations:call weaviate.weaviate_get_health '{}' --json

Provider shortcut

kosmo integrations:weaviate weaviate_get_health '{}' --json

Function Schemas

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

weaviate.weaviate_list_schemas

List all schemas (collections/classes) defined in the Weaviate instance. Returns the full schema including all classes and their properties.

Operation
Read read
Schema command
kosmo integrations:schema weaviate.weaviate_list_schemas --json
ParameterTypeRequiredDescription
No parameters.

weaviate.weaviate_get_schema

Get the schema definition for a specific class (collection) in Weaviate. Returns the class name, properties, vectorizer config, and module settings.

Operation
Read read
Schema command
kosmo integrations:schema weaviate.weaviate_get_schema --json
ParameterTypeRequiredDescription
class_name string yes The name of the class/collection to retrieve the schema for (e.g., "Article", "Document").

weaviate.weaviate_create_class

Create a new class (collection) in the Weaviate schema. Provide a class definition with the class name and an array of property definitions (name, dataType, etc.).

Operation
Write write
Schema command
kosmo integrations:schema weaviate.weaviate_create_class --json
ParameterTypeRequiredDescription
class object yes The class definition object. Must include "class" (string name) and "properties" (array of property definitions). Each property needs "name" (string) and "dataType" (array of strings, e.g., ["text"]).

weaviate.weaviate_search_objects

Search and query objects in Weaviate using GraphQL. Supports Get, Aggregate, and Explore queries with filters, sorting, and vector/nearVector/nearText search.

Operation
Read read
Schema command
kosmo integrations:schema weaviate.weaviate_search_objects --json
ParameterTypeRequiredDescription
query string yes The GraphQL query string to execute against the Weaviate GraphQL endpoint. E.g.: { Get { Article { title content } } }

weaviate.weaviate_create_object

Create a new data object in a Weaviate class. Provide the class name and a properties object with the data fields. Optionally specify a UUID for the object.

Operation
Write write
Schema command
kosmo integrations:schema weaviate.weaviate_create_object --json
ParameterTypeRequiredDescription
class string yes The class/collection name to create the object in (e.g., "Article", "Document").
properties object yes The object properties as key-value pairs. Keys must match the property names defined in the class schema.
id string no Optional UUID for the object. If not provided, Weaviate will auto-generate one.

weaviate.weaviate_get_object

Retrieve a specific data object from Weaviate by its class name and UUID. Returns the full object including all properties and metadata.

Operation
Read read
Schema command
kosmo integrations:schema weaviate.weaviate_get_object --json
ParameterTypeRequiredDescription
class_name string yes The class/collection name the object belongs to (e.g., "Article", "Document").
id string yes The UUID of the object to retrieve.

weaviate.weaviate_get_health

Check the health and liveness of the Weaviate instance. Returns a status indicating whether the service is alive and responsive.

Operation
Read read
Schema command
kosmo integrations:schema weaviate.weaviate_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.