Using Lens Prism#
Lens premium subscription feature. See details on Lens Pricing.
Lens Prism is the built-in AI assistant in Lens K8S IDE. Ask Lens Prism about your cluster in natural language and get answers grounded in live cluster state, without writing kubectl commands.
Use Lens Prism whether you are new to Kubernetes or an experienced operator who needs quick answers.
With Lens Prism you can:
-
Ask questions about your cluster, such as:
- Which pods are failing right now?
- Show logs for the payment service.
- How much CPU is used per node?
-
Troubleshoot issues without using
kubectlcommands. - Get environment-aware updates based on your actual cluster state.
Lens Prism can run kubectl commands and respond with contextual results, including pods, logs, resource usage, events, and so on.
Once Lens Prism is configured:
- Connect to a cluster.
-
Click the Open Lens Prism icon in Title Bar. A dock tab with the Lens Prism session opens under the cluster view.
Tip
You can start chatting with Lens Prism using the Ctrl+I (Linux/Windows) or Cmd+I (macOS) shortcut. See Lens K8S IDE shortcuts for a complete list.
-
Enter a natural language prompt, for example:
Which pods are failing at the moment?
As a result, Lens Prism fetches live cluster data and responds with contextual information such as running pods, logs, resource usage, and more.
Info
Each Lens Prism session runs in its own dock tab and is scoped to a single cluster. You can open multiple sessions per cluster, and Lens Prism only processes data from the cluster tied to each session.
Ask Prism from a resource table#
Most Kubernetes resource tables in Lens Desktop expose an Ask Prism entry that opens a Lens Prism tab with the selected resource preloaded as context. This is the fastest way to investigate one item without typing its name.
- Per-row action. Right-click a row in a resource table (Pods, Deployments, Services, EndpointSlices, ConfigMaps, Secrets, Nodes, and most other Kubernetes kinds) and select Ask Prism. Lens Prism opens in Ask mode with the resource attached.
- Resource details panel. Open a resource's details panel and click the Prism icon at the top of the panel. Pick a suggested action to open Lens Prism with the resource attached.
Use these entry points to skip the cluster-wide investigation step and have Lens Prism focus directly on the resource you selected.
Open resources from a response#
When Lens Prism mentions a Kubernetes resource in its answer, the resource name appears as a link. Click the link to open the resource's details panel next to the chat without leaving the conversation. Use this to inspect metrics, events, logs, or configuration for any resource Lens Prism surfaces during an investigation.

Select provider and model per conversation#
In the chat composer toolbar, open the model dropdown to choose the provider and model for the current conversation. Models are grouped by provider, so you can pick any model from any configured provider.
- Each Lens Prism tab keeps its own provider and model. Changing the dropdown in one tab does not affect the others.
- If the previously selected provider is unavailable (for example, because it was removed from Integrations), Lens Prism falls back to the first available provider so the chat keeps working.
- The dropdown shows No valid models until you configure a provider. Add one in Preferences > Integrations > Prism AI LLM Providers to make models selectable.
To configure providers, see How to configure AI providers.
Token usage display#
Lens Prism shows token usage in two places inside the chat UI.
- Per-message: each assistant message shows the tokens used to produce that specific response. Hover over the counter to see the tooltip Tokens used for this message.
- Conversation total: the chat toolbar shows cumulative tokens for the entire session. Hover over the counter to see the tooltip Total tokens used in this conversation.
Both counters use the format In: <input tokens> ยท Out: <output tokens>. Values of 1,000 or more are abbreviated with a k suffix (for example, In: 1.2k); values of 1,000,000 or more use an M suffix. A counter is hidden when no token data is available for that message or conversation.
The conversation total resets when you reset the conversation in the chat. Per-message counts persist with each assistant response in the session history.
Use the counters to track consumption against your provider's pricing.
Chat modes#
Lens Prism runs in one of two chat modes. Select the active mode from the mode selector in the Lens Prism chat toolbar. The active mode controls Lens Prism's response style, investigation workflow, and the tools Lens Prism can call.
Ask mode#
Ask mode is a single-turn question-and-answer mode for Kubernetes topics. Lens Prism returns one focused answer per prompt and stays read-only on the cluster. Responses cover Kubernetes resources, cluster health, metrics, logs, events, security, and best practices. Ask mode is the default for a new Lens Prism tab.
How Ask mode works#
Response style. Lens Prism returns one focused answer per prompt and presents a single recommended solution when one applies.
Scope. Lens Prism declines questions outside Kubernetes topics.
Investigation. Before answering a cluster-wide question, Lens Prism collects node status, pod status, non-running pods, recent Warning events, deployment readiness, container states, restart counts, probe failures, and CrashLoopBackOff conditions. Before answering a resource-specific question, Lens Prism collects the resource status, container state, scoped events, logs, metrics, configuration, and related Custom Resource Definition (CRD) instances. Lens Prism reads installed CRDs and operators at session start to adapt its answers to the cluster's stack.
Cluster posture. Read-only. When a change is required, Lens Prism returns a kubectl patch or kubectl apply command and states that execution is your responsibility.
Available tools. Read-only Kubernetes query tools. Internet search, URL fetch, and UI navigation skills are not available in Ask mode.
Start a conversation in Ask mode#
- Click the Open Lens Prism icon in the title bar. Lens Desktop opens a new Lens Prism tab in Ask mode.
- Click the Prism icon at the top of a Kubernetes resource's details panel and select a suggested action. Lens Desktop opens a new Lens Prism tab in Ask mode with the resource pre-loaded as context.
Agent mode#
Agent mode is an autonomous, multi-turn mode. Lens Prism iterates across many tool calls on a single request, follows a fixed five-phase workflow (Understand, Investigate, Plan, Troubleshoot, Summary), and finishes with a mandatory Summary section. Agent mode also enables internet search, URL fetch, and Lens Desktop UI navigation, which Ask mode does not expose.
How Agent mode works#
Response style. Lens Prism iterates across multiple tool calls until the request is fully resolved. Lens Prism announces each intended action in one sentence before executing the call. Responses use bullet points and code blocks. Lens Prism does not render raw kubectl commands or YAML unless you request them.
Five-phase workflow. Every request follows this sequence:
- Understand. Lens Prism reads the request and plans before touching the cluster.
- Investigate. Lens Prism enumerates the resources, settings, metrics, events, logs, and CRD instances that relate to the request.
- Plan. Lens Prism produces a markdown checklist using
- [ ]items and displays the list in the chat. As each step completes, Lens Prism marks it- [x]and redisplays the updated list. - Troubleshoot. Lens Prism works toward the root cause, revisits assumptions when results contradict them, and only recommends fixes it is highly confident about.
- Summary. Lens Prism produces a final Summary section on every response. The summary contains the original problem, investigation steps and their outcomes, the identified root cause, the required
kubectlcommands or configuration changes, and recommendations for future prevention or monitoring.
Cluster posture. Read-only. Lens Prism surfaces any required change as a kubectl command for you to run.
Available tools. Agent mode can call all Ask-mode tools plus three additional skills:
- Internet search. Queries DuckDuckGo and returns the results as Markdown.
- URL fetch. Retrieves any HTTP or HTTPS page and returns the content as Markdown.
-
UI navigation. Opens a Lens Desktop view on your behalf. Supported views:
- Namespaced resource view (Pods, Deployments, Services, ConfigMaps, Secrets, StatefulSets, DaemonSets, Jobs, CronJobs, Ingresses, PersistentVolumeClaims)
- Cluster-scoped resource view (Nodes, Namespaces, PersistentVolumes, ClusterRoles, ClusterRoleBindings, StorageClasses)
- Helm releases view
- Custom Resources view
Views accept namespace and regex name filters.
Start a conversation in Agent mode#
- Open a Lens Prism tab. See Start a conversation in Ask mode for entry points.
- Open the mode selector in the chat toolbar.
- Select Agent.
Watch the overview of Agent mode in the video below.
Terminal commands#
Lens Prism can run shell commands on your local system when an investigation calls for it (for example, to invoke kubectl or another CLI). Because these commands run with your local permissions, every command requires your confirmation before it executes.
Confirmation modal. When Lens Prism is about to run a command, a modal opens with:
- The exact command under a Run command: label.
- A safety notice: "Terminal commands can modify or delete files, access sensitive data, and affect system security. Always review commands before execution."
- Cancel and Next buttons.
Lens Prism only runs the command after you confirm. If you cancel, the model is told the command was declined and continues without it.
Cloud provider context. When you run Lens Prism against an EKS or AKS cluster, the connected cluster's KUBECONFIG and cloud credentials are bridged into the command's environment so kubectl and cloud CLIs (for example, aws or az) authenticate the same way they would from a Lens Desktop terminal. No extra setup is required on your machine.
Output limits. Long command output is truncated and command execution is bound by a timeout. If a command exceeds either limit, Lens Prism reports the truncation and continues with the available output.
Prompt examples#
When using Lens Prism, follow these principles:
- Ask concise, focused questions. For example: What's wrong with my
pod-name? - Use specific resource names or namespaces when possible
In the table below, there are examples for some prompts:
| Use Case | Example |
|---|---|
| Pod status | What pods are failing? |
| Logs | Show logs for backend service |
| Metrics | What is the CPU usage on node x? |
| Config help | Explain what this deployment does |
| YAML review | Summarize this config file |
| Debugging | Why is my ingress not routing? |