KubeBolt / docs
GitHub

AI Copilot

Talk to your cluster in natural language. Press ⌘J to open.

How it Works

The copilot sends your question to a configured LLM provider along with tool definitions that map to KubeBolt’s REST API. The LLM calls tools to fetch live cluster data, analyzes the results, and responds with data-backed answers and kubectl commands.

17 Native Tools

ToolWhat it does
get_cluster_overviewResource counts, CPU/memory, health score, events
list_resourcesList any of 23 resource types with filtering
get_resource_detailFull detail of a specific resource
get_resource_yamlRaw YAML definition (secrets redacted)
get_resource_describekubectl-describe output for deep troubleshooting
get_pod_logsPod logs with container, tail, since and grep options
get_workload_podsPods owned by a workload controller
get_workload_historyRevision history for Deployments/StatefulSets/DaemonSets
get_cronjob_jobsJob children of a CronJob to investigate execution history
get_topologyFull cluster topology graph
get_insightsActive insights with severity
get_eventsEvents with filtering
search_resourcesGlobal search by name across 16 resource types
get_permissionsDetected RBAC permissions
list_clustersAll available kubeconfig contexts
get_kubebolt_docsProduct knowledge base (features, navigation, admin pages)

Supported Providers

BYO Key: You bring your own API key. KubeBolt never stores or transmits your key to any server other than the provider you configure. For production, use the API proxy mode to keep keys server-side.

Contextual “Ask Copilot”

Launches the Copilot panel with a pre-loaded prompt that already carries the cluster, namespace, resource name and symptom. Five surfaces:

Templates live in services/copilot/triggers.ts and are versioned so the LLM never sees stale framing.

Conversation memory

Long sessions stop bleeding context. When the estimated conversation size crosses SESSION_BUDGET_TOKENS × AUTO_COMPACT_THRESHOLD (default 80%), the handler folds older turns into a summary generated by the provider’s cheap-tier model (Haiku 4.5 / gpt-4o-mini) and stubs bulky tool_results in the preserved tail. The active turn’s tool_results are always protected so mid-flight compacts never truncate a response.

A Scissors icon in the panel header exposes the same primitive on demand — “new session with summary” collapses the whole transcript into a single summary message so you can pivot topics without losing context.

Env varDefaultPurpose
KUBEBOLT_AI_AUTO_COMPACTtrueMaster switch for auto-compaction
KUBEBOLT_AI_SESSION_BUDGET_TOKENScontext window of the modelTotal ceiling. Trigger fires at budget × threshold
KUBEBOLT_AI_AUTO_COMPACT_THRESHOLD0.80Fraction of the budget at which compact fires
KUBEBOLT_AI_COMPACT_MODELauto (cheap tier of same provider)Override the summarisation model
KUBEBOLT_AI_COMPACT_PRESERVE_TURNS3Turns kept intact after compaction

Scope guardrail

The system prompt defines in-scope (Kubernetes operations, DevOps/SRE topics that support the user’s cluster, KubeBolt itself) and out-of-scope (general coding unrelated to cluster resources, non-technical topics, competitor cloud products). The LLM refuses out-of-scope questions with a one-sentence polite redirect in the user’s language — never answers partially.

Admin Copilot Usage

At /admin/copilot-usage: sessions, tokens billed, cache hit rate, estimated USD cost (best-effort pricing table for Anthropic and OpenAI), top tools with error rates, and a per-session drill-down modal with tool breakdown and compact events. Range selector 24h / 7d / 30d. Stored locally in BoltDB with a 30-day / 5000-entry retention cap. Requires authentication to be enabled.