KosmoKrator

data

Confluent Cloud CLI for AI Agents

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

7 functions 6 read 1 write API token auth

Confluent Cloud CLI Setup

Confluent Cloud can be configured headlessly with `kosmokrator integrations:configure confluent`.

# 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 confluent --set api_token="$CONFLUENT_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor confluent --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
api_token CONFLUENT_API_TOKEN Secret secret yes API Token
cluster_id CONFLUENT_CLUSTER_ID Text text no Cluster ID

Call Confluent Cloud Headlessly

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

kosmo integrations:call confluent.confluent_list_topics '{
  "cluster_id": "example_cluster_id"
}' --json

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

kosmo integrations:confluent confluent_list_topics '{
  "cluster_id": "example_cluster_id"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs confluent --json
kosmo integrations:docs confluent.confluent_list_topics --json
kosmo integrations:schema confluent.confluent_list_topics --json
kosmo integrations:search "Confluent Cloud" --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 Confluent Cloud.

confluent.confluent_list_topics

Read read

List Kafka topics in a Confluent cluster. Returns topic names, partition counts, replication factors, and status.

Parameters
cluster_id

Generic CLI call

kosmo integrations:call confluent.confluent_list_topics '{"cluster_id":"example_cluster_id"}' --json

Provider shortcut

kosmo integrations:confluent confluent_list_topics '{"cluster_id":"example_cluster_id"}' --json

confluent.confluent_get_topic

Read read

Get full details of a specific Kafka topic by name. Returns partition count, replication factor, and topic configuration.

Parameters
topic_name, cluster_id

Generic CLI call

kosmo integrations:call confluent.confluent_get_topic '{"topic_name":"example_topic_name","cluster_id":"example_cluster_id"}' --json

Provider shortcut

kosmo integrations:confluent confluent_get_topic '{"topic_name":"example_topic_name","cluster_id":"example_cluster_id"}' --json

confluent.confluent_create_topic

Write write

Create a new Kafka topic in a Confluent cluster. Specify the topic name, partition count, and optional replication factor and configs.

Parameters
topic_name, partitions_count, replication_factor, configs, cluster_id

Generic CLI call

kosmo integrations:call confluent.confluent_create_topic '{"topic_name":"example_topic_name","partitions_count":1,"replication_factor":1,"configs":"example_configs","cluster_id":"example_cluster_id"}' --json

Provider shortcut

kosmo integrations:confluent confluent_create_topic '{"topic_name":"example_topic_name","partitions_count":1,"replication_factor":1,"configs":"example_configs","cluster_id":"example_cluster_id"}' --json

confluent.confluent_list_clusters

Read read

List Kafka clusters in your Confluent Cloud environment. Returns cluster IDs, names, types, and status.

Parameters
none

Generic CLI call

kosmo integrations:call confluent.confluent_list_clusters '{}' --json

Provider shortcut

kosmo integrations:confluent confluent_list_clusters '{}' --json

confluent.confluent_get_cluster

Read read

Get details of a specific Kafka cluster. Returns broker count, controller info, and cluster configuration.

Parameters
cluster_id

Generic CLI call

kosmo integrations:call confluent.confluent_get_cluster '{"cluster_id":"example_cluster_id"}' --json

Provider shortcut

kosmo integrations:confluent confluent_get_cluster '{"cluster_id":"example_cluster_id"}' --json

confluent.confluent_list_environments

Read read

List Confluent Cloud environments. Returns environment IDs, names, and associated cluster resources.

Parameters
none

Generic CLI call

kosmo integrations:call confluent.confluent_list_environments '{}' --json

Provider shortcut

kosmo integrations:confluent confluent_list_environments '{}' --json

confluent.confluent_get_current_user

Read read

Get the currently authenticated Confluent Cloud user. Useful for verifying credentials and identifying the connected account.

Parameters
none

Generic CLI call

kosmo integrations:call confluent.confluent_get_current_user '{}' --json

Provider shortcut

kosmo integrations:confluent confluent_get_current_user '{}' --json

Function Schemas

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

confluent.confluent_list_topics

List Kafka topics in a Confluent cluster. Returns topic names, partition counts, replication factors, and status.

Operation
Read read
Schema command
kosmo integrations:schema confluent.confluent_list_topics --json
ParameterTypeRequiredDescription
cluster_id string no Override the default Kafka cluster ID.

confluent.confluent_get_topic

Get full details of a specific Kafka topic by name. Returns partition count, replication factor, and topic configuration.

Operation
Read read
Schema command
kosmo integrations:schema confluent.confluent_get_topic --json
ParameterTypeRequiredDescription
topic_name string yes The name of the topic to retrieve.
cluster_id string no Override the default Kafka cluster ID.

confluent.confluent_create_topic

Create a new Kafka topic in a Confluent cluster. Specify the topic name, partition count, and optional replication factor and configs.

Operation
Write write
Schema command
kosmo integrations:schema confluent.confluent_create_topic --json
ParameterTypeRequiredDescription
topic_name string yes The name for the new topic.
partitions_count integer yes Number of partitions for the topic (e.g., 6).
replication_factor integer no Replication factor (e.g., 3 for production). Defaults to the cluster default.
configs object no JSON-encoded topic configs: retention.ms, cleanup.policy, etc.
cluster_id string no Override the default Kafka cluster ID.

confluent.confluent_list_clusters

List Kafka clusters in your Confluent Cloud environment. Returns cluster IDs, names, types, and status.

Operation
Read read
Schema command
kosmo integrations:schema confluent.confluent_list_clusters --json
ParameterTypeRequiredDescription
No parameters.

confluent.confluent_get_cluster

Get details of a specific Kafka cluster. Returns broker count, controller info, and cluster configuration.

Operation
Read read
Schema command
kosmo integrations:schema confluent.confluent_get_cluster --json
ParameterTypeRequiredDescription
cluster_id string no The cluster ID to retrieve. Uses the default cluster if not specified.

confluent.confluent_list_environments

List Confluent Cloud environments. Returns environment IDs, names, and associated cluster resources.

Operation
Read read
Schema command
kosmo integrations:schema confluent.confluent_list_environments --json
ParameterTypeRequiredDescription
No parameters.

confluent.confluent_get_current_user

Get the currently authenticated Confluent Cloud user. Useful for verifying credentials and identifying the connected account.

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