KosmoKrator

data

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.

Weaviate CLI Setup

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

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 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key WEAVIATE_API_KEY Secret secret no API Key
url WEAVIATE_URL URL url no Weaviate URL

Command Patterns

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

Generic CLI call
kosmo integrations:call weaviate.weaviate_list_schemas '{}' --json
Provider shortcut
kosmo integrations:weaviate weaviate_list_schemas '{}' --json

Discovery

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

Discovery commands
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

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.

weaviate.weaviate_list_schemas

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

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

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.

Read read
Parameters
class_name
Generic call
kosmo integrations:call weaviate.weaviate_get_schema '{"class_name":"example_class_name"}' --json
Shortcut
kosmo integrations:weaviate weaviate_get_schema '{"class_name":"example_class_name"}' --json

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.).

Write write
Parameters
class
Generic call
kosmo integrations:call weaviate.weaviate_create_class '{"class":"example_class"}' --json
Shortcut
kosmo integrations:weaviate weaviate_create_class '{"class":"example_class"}' --json

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.

Read read
Parameters
query
Generic call
kosmo integrations:call weaviate.weaviate_search_objects '{"query":"example_query"}' --json
Shortcut
kosmo integrations:weaviate weaviate_search_objects '{"query":"example_query"}' --json

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.

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

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.

Read read
Parameters
class_name, id
Generic call
kosmo integrations:call weaviate.weaviate_get_object '{"class_name":"example_class_name","id":"example_id"}' --json
Shortcut
kosmo integrations:weaviate weaviate_get_object '{"class_name":"example_class_name","id":"example_id"}' --json

weaviate.weaviate_get_health

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

Read read
Parameters
none
Generic call
kosmo integrations:call weaviate.weaviate_get_health '{}' --json
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 0 parameters
Schema command
kosmo integrations:schema weaviate.weaviate_list_schemas --json
ParameterTypeRequiredDescription
No parameters.
weaviate.weaviate_get_schema 1 parameters
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 1 parameters
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 1 parameters
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 3 parameters
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 2 parameters
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 0 parameters
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.