Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Resources to explore

Check out popular resources, tools, and information from Red Hat. We'll recommend more as you browse.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Configure Red Hat OpenShift Lightspeed autonomous agents

Automated cluster troubleshooting with OpenShift Lightspeed autonomous agents

November 23, 2026
Alberto Falossi Katya Gordeeva
Related topics:
Kubernetes
Related products:
Red Hat OpenShiftRed Hat OpenShift Lightspeed

    With Red Hat OpenShift Lightspeed 2 on Red Hat OpenShift 5, you can configure autonomous agents to start troubleshooting when a cluster alert fires. An agent can inspect cluster resources, read logs and events, and propose a fix. With the required approvals, the workflow can then apply the fix and verify the result.

    In this article, you'll learn how this workflow works, how to enable it, and how to control its level of automation. We'll then test it with a cluster failure, following the investigation from the initial alert to remediation and verification.

    How OpenShift Lightspeed autonomous agents work

    OpenShift Lightspeed autonomous agents follow a workflow with 4 tasks: analyzing the problem, applying a fix, checking the result, and escalating when you need further help. You can use the same agent across stages or configure different agents for each one.

    The process starts when OpenShift Lightspeed detects a firing alert that matches its configuration. It creates an AgenticRun, a custom resource that tracks the investigation and its progress through the workflow:

    1. Analysis. The agent inspects cluster resources, reads logs and events, and gathers evidence to identify the likely cause. It then prepares a diagnosis and a proposed remediation for review.
    2. Execution. After approval, the agent applies the proposed fix in a temporary sandbox with permissions scoped to the task.
    3. Verification. The agent checks whether the remediation resolved the problem.
    4. Escalation. If execution or verification fails, the escalation agent summarizes the outcome and provides context for an administrator to continue the investigation.

    An approval policy controls whether each stage requires manual approval or starts automatically. By default, every stage waits for approval. Later in this article, we'll configure a policy that lets analysis and verification run automatically while keeping execution under your control.

    Figure 1 shows an example of an AgenticRun in the Red Hat OpenShift web console after the agent diagnoses an alert and executes a fix.

    OpenShift web console showing an AgenticRun with root cause analysis and succeeded deployment image update actions.
    Figure 1: An AgenticRun detail view displaying the analysis request, selected remediation plan, and execution results.

    Prerequisites

    • Red Hat OpenShift 5.0+ cluster with cluster-admin access
    • An API key for a tool-calling large language model (LLM) (this guide uses OpenAI with the gpt-5.6-luna model, but OpenShift Lightspeed supports other providers and models; see the OpenShift Lightspeed documentation for all available configurations)

    OpenShift Lightspeed autonomous agents are available as a Technology Preview. Red Hat doesn't support Technology Preview features with production service level agreements (SLAs), and they might not be functionally complete. Red Hat doesn't recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

    For details, see Technology Preview Features Support Scope.

    Step 1: Install OpenShift Lightspeed

    In the Red Hat OpenShift web console, go to Ecosystem → Software Catalog and search for OpenShift Lightspeed, as shown in Figure 2. Accept the default settings, and select Install.

    Software Catalog filtered by "openshift lightspeed," displaying the Red Hat-provided operator card.
    Figure 2: The OpenShift Lightspeed Operator tile appears in the Software Catalog search results.

    Installing the operator prepares the controllers. We'll configure alert filtering next, then create the OLSConfig custom resource that deploys the Lightspeed services.

    Step 2: Choose which alerts to investigate

    By default, no alerts trigger an automatic investigation. To enable this behavior, configure the alerts-adapter-config ConfigMap and specify which Alertmanager receivers the agents should monitor.

    Alertmanager uses routing rules to assign alerts to named receivers based on labels such as severity or namespace. By listing receiver names under allowedReceivers, you reuse those rules to select which alerts can trigger an investigation. This example allows alerts routed to the Critical receiver:

    oc apply -f - <<'EOF'
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: alerts-adapter-config
      namespace: openshift-lightspeed
    data:
      config.yaml: |
        filtering:
          allowedReceivers:
          - Critical
        tools:
          skills:
            - image: quay.io/openshiftanalytics/agentic-skills:ocp-5.0
              paths:
                - /skills/cluster-troubleshoot/investigate-alert
    EOF

    Critical is a receiver name, rather than a severity label. The default OpenShift Alertmanager configuration routes alerts with severity: critical to this receiver. If your cluster uses different routing rules, adjust the receiver name accordingly.

    The tools.skills section shows how to add optional skills to guide the agent during analysis. This example uses the cluster-troubleshoot skill from the openshift/agentic-skills repository, packaged as an Open Container Initiative (OCI) image and published at quay.io/openshiftanalytics/agentic-skills.

    In the next step, we'll reference this ConfigMap in the OLSConfig to enable alert processing. For more configuration options, see Autonomous agentic troubleshooting.

    Step 3: Configure Lightspeed and enable alert processing

    The alert configuration is now in place. Next, we'll create the OLSConfig that deploys the Lightspeed services and connects them to this configuration.

    OpenShift Lightspeed intelligent assistant and OpenShift Lightspeed autonomous agents currently use separate LLM credential configurations. We'll configure the credentials for intelligent assistant here, then configure those for autonomous agents in the next step.

    First, create the credentials secret:

    oc apply -f - <<'EOF'
    apiVersion: v1
    kind: Secret
    metadata:
      name: credentials
      namespace: openshift-lightspeed
    type: Opaque
    stringData:
      apitoken: <YOUR_OPENAI_API_KEY>
    EOF

    Now create the OLSConfig with the alerts adapter enabled:

    oc apply -f - <<'EOF'
    apiVersion: ols.openshift.io/v1alpha1
    kind: OLSConfig
    metadata:
      name: cluster
    spec:
      llm:
        providers:
          - name: openai
            type: openai
            credentialsSecretRef:
              name: credentials
            url: https://api.openai.com/v1
            models:
              - name: gpt-5.6-luna
      ols:
        defaultModel: gpt-5.6-luna
        defaultProvider: openai
        deployment:
          alertsAdapter:
            configMapRef:
              name: alerts-adapter-config
    EOF

    Wait for the app server to become available. The initial image downloads can take several minutes:

    oc wait --for=condition=Available deployment/lightspeed-app-server \
      -n openshift-lightspeed --timeout=900s

    Verify the alerts adapter is running:

    oc rollout status deployment/lightspeed-agentic-alerts-adapter \
      -n openshift-lightspeed --timeout=300s

    Step 4: Configure the troubleshooting agent

    OpenShift Lightspeed autonomous agents require an LLM provider and a model. The following configuration creates the provider credentials, connects them through an LLMProvider, and defines the default agent used by the workflow:

    oc apply -f - <<'EOF'
    apiVersion: v1
    kind: Secret
    metadata:
      name: llm-creds-openai
      namespace: openshift-lightspeed
    type: Opaque
    stringData:
      OPENAI_API_KEY: <YOUR_OPENAI_API_KEY>
    ---
    apiVersion: agentic.openshift.io/v1alpha1
    kind: LLMProvider
    metadata:
      name: openai
      namespace: openshift-lightspeed
    spec:
      type: OpenAI
      openAI:
        credentialsSecret:
          name: llm-creds-openai
    ---
    apiVersion: agentic.openshift.io/v1alpha1
    kind: Agent
    metadata:
      name: default
      namespace: openshift-lightspeed
    spec:
      llmProvider:
        name: openai
      model: gpt-5.6-luna
    EOF

    The workflow uses the default agent unless you select another agent. You can define additional Agent resources to use different models or settings for specific stages.

    Step 5: Grant investigation and execution permissions

    The agent now has a model, but it also needs access to cluster data. We'll grant read access for investigation and give the controller permissions to create remediation sandboxes.

    Investigation permissions

    The agent service account needs cluster-wide read access. The operator doesn't create these bindings automatically. Keep lightspeed-agent in the subjects of both bindings: the controller uses this account to find the reader bindings and grant read permissions to sandbox service accounts. Without the reader binding, analysis fails before the agent starts, with an error such as "no ClusterRoleBinding found with subject openshift-lightspeed/lightspeed-agent." Apply both bindings before starting an AgenticRun:

    oc apply -f - <<'EOF'
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: lightspeed-agent-cluster-reader
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-reader
    subjects:
    - kind: ServiceAccount
      name: lightspeed-agent
      namespace: openshift-lightspeed
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: lightspeed-agent-monitoring-view
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-monitoring-view
    subjects:
    - kind: ServiceAccount
      name: lightspeed-agent
      namespace: openshift-lightspeed
    EOF

    Execution permissions

    For this walkthrough, we grant the controller cluster-admin access so it can create the roles that remediation sandboxes need. Each sandbox receives the permissions defined for its task:

    oc apply -f - <<'EOF'
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: lightspeed-agentic-controller-cluster-admin-extra
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
    - kind: ServiceAccount
      name: lightspeed-agentic-operator-controller-manager
      namespace: openshift-lightspeed
    EOF

    For a more restricted setup, limit the controller permissions to the operations you intend to allow. The controller permissions and the permissions assigned to each temporary sandbox are separate parts of the access model.

    Step 6: Choose which stages require approval

    With credentials and permissions in place, we can decide where the workflow should pause for review. Without an ApprovalPolicy, every stage waits for manual approval.

    For this example, we'll let analysis, verification, and escalation run automatically. Execution will still require your approval, so you can review the diagnosis and proposed changes before the agent applies them:

    oc apply -f - <<'EOF'
    apiVersion: agentic.openshift.io/v1alpha1
    kind: ApprovalPolicy
    metadata:
      name: cluster
    spec:
      stages:
        - name: Analysis
          approval: Automatic
        - name: Execution
          approval: Manual
        - name: Verification
          approval: Automatic
        - name: Escalation
          approval: Automatic
    EOF

    Approval is at the stage level: you approve or reject an entire stage, not individual commands within it. With this policy, only execution pauses for your sign-off.

    Test the workflow with an image-pull failure

    The configuration is complete. We'll now deploy an application with an incorrect image name and follow the workflow through investigation, approval, and verification.

    Trigger an investigation

    The following manifest creates the deployment and an alert that detects its image-pull failure:

    oc apply -f - <<'EOF'
    apiVersion: v1
    kind: Namespace
    metadata:
      name: web-app
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: web-server
      namespace: web-app
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: web-server
      template:
        metadata:
          labels:
            app: web-server
        spec:
          containers:
            - name: hello
              image: quay.io/openshift/origin-ehllo-openshift:latest
    ---
    apiVersion: monitoring.coreos.com/v1
    kind: PrometheusRule
    metadata:
      name: web-server-image-pull-alert
      namespace: openshift-monitoring
    spec:
      groups:
        - name: web-server.alerts
          rules:
            - alert: WebServerImagePullFailure
              expr: |
                max by (namespace, pod, container) (
                  kube_pod_container_status_waiting_reason{
                    namespace="web-app",
                    reason="ImagePullBackOff"
                  } > 0
                )
              for: 1m
              labels:
                severity: critical
              annotations:
                summary: "Pod {{ $labels.pod }} cannot pull its container image"
                description: >-
                  Container {{ $labels.container }} in pod {{ $labels.pod }}
                  (namespace {{ $labels.namespace }}) is stuck in ImagePullBackOff.
    EOF

    The image name origin-ehllo-openshift is a typo—the correct name is origin-hello-openshift. The pods enter ImagePullBackOff, and the WebServerImagePullFailure alert fires after the condition has remained true for 1 minute, plus evaluation and routing delays.

    This manifest places the PrometheusRule in openshift-monitoring so platform Prometheus evaluates it without enabling user-workload monitoring. We don't recommend this for production environments because Red Hat OpenShift reserves that namespace for platform alerts—use user-workload monitoring and deploy PrometheusRule resources in your application namespace instead. The severity: critical label causes Alertmanager to route the alert to the Critical receiver, which matches the adapter configuration from step 2.

    Once the alert fires, the alerts adapter creates an AgenticRun:

    oc get agenticrun -n openshift-lightspeed -w

    You can also monitor the investigation in the Red Hat OpenShift web console under Observe → Agentic Runs → Agentic runs, as shown in Figure 3.

    Agentic runs table with Agentic capabilities toggled on and one pending run named webserverimagepullfailure-web-app-ab96b5ae.
    Figure 3: The Agentic runs list displays the newly triggered run in Pending status with Alertmanager as the trigger domain.

    If you kept the default approval policy instead of applying the step 6 policy, the run pauses at the analysis stage until you select Approve Analysis (Figure 4).

    AgenticRun details showing the WebServerImagePullFailure alert, a Waiting for approval card, and an Approve Analysis button.
    Figure 4: An AgenticRun detail page paused at the analysis stage, prompting for manual approval before generating remediation plans.

    Review and approve the remediation

    With the policy from step 6, analysis starts automatically. The agent inspects the pods, reads events, and prepares a diagnosis and remediation plan. If you kept the default approval policy, approve analysis first.

    Open the run in Agentic Runs and review the diagnosis and proposed changes. For this example, check whether the agent has identified the incorrect image reference and proposed a suitable replacement.

    Approve the execution stage to let the agent apply the remediation. With the policy from step 6, the workflow then proceeds automatically to verification, where the agent checks the result.

    Review the image reference identified in the diagnosis and the proposed remediation before approving execution. Open the run in Agentic runs to review the proposed remediation options generated by the analysis stage, as shown in Figure 5.

    Remediation plans section listing two radio button options, with Execute remediation disabled until a plan is selected.
    Figure 5: The analysis stage generates two reversible remediation plans and marks correcting the Deployment image reference as AI recommended.

    Select the AI-recommended plan to inspect its root cause diagnosis, scoped namespace permissions, and proposed commands before approving execution (Figure 6).

    Expanded plan showing root cause text, a permissions table, proposed commands, and an enabled Execute remediation button.
    Figure 6: Expanded details for Plan 1 display the misspelled image diagnosis, scoped patch permission for the web-server Deployment, and proposed kubectl command.

    After you select Execute remediation, the agent updates the Deployment in a scoped sandbox and tracks each step in the Execution card (Figure 7).

    Execution stage panel displaying approval metadata, remediation delta summary, and three green Succeeded status badges.
    Figure 7: The Execution card confirms that the image mutation, rollout wait, and post-check actions all succeeded.

    With the step 6 approval policy, the workflow then proceeds automatically to verification and confirms that the replacement pod is ready (Figure 8).

    Verification summary card showing green Passed badges for correct-image-and-available-replicas and replacement-pod-ready.
    Figure 8: The AI-generated Verification summary shows that both checks passed, confirming the corrected container image and 1/1 available replicas.

    Returning to the Agentic runs list confirms that the run status has updated to Completed alongside its token consumption totals (Figure 9).

    Agentic runs table showing run webserverimagepullfailure-web-app-10b88003 marked Completed with 110,900 / 9,564 tokens.
    Figure 9: The Agentic runs table lists the finished run with a Completed status and displays input and output token counts.

    Check the result

    Review the verification outcome in the run, then check the deployment independently:

    oc rollout status deployment/web-server -n web-app --timeout=300s

    Confirm the deployment becomes available and the alert resolves. Alert resolution can take longer than the rollout because Prometheus and Alertmanager update on their own schedules.

    Other alerts routed to the Critical receiver can also trigger investigations. With the policy from Step 6, these runs start analysis automatically and pause before execution. Review each proposal before approving changes.

    Clean up

    oc delete namespace web-app
    oc delete prometheusrule web-server-image-pull-alert -n openshift-monitoring
    oc delete agenticrun <run-name> -n openshift-lightspeed

    Replace with the name from the oc get agenticrun output.

    What to try next

    In this example, we followed a troubleshooting run from a firing alert through analysis, remediation, and verification. Receiver filtering determined which alerts could start a run, while the approval policy determined where the workflow paused for review.

    To evaluate the workflow further, try another failure you understand well. Compare the agent's diagnosis with the cluster evidence, review the proposed changes, and check the result after execution. Keeping the execution approval manual gives you a clear point to assess each proposal as you explore different cases.

    Share your findings about OpenShift Lightspeed autonomous agents through the Red Hat OpenShift web console feedback mechanism, including cases where the diagnosis was incomplete or the proposed remediation needed changes.

    Recent Posts

    • Configure Red Hat OpenShift Lightspeed autonomous agents

    • High Scale Performance Testing of OpenShift Virtualization : An Introduction

    • Automate Lightwell updates with Mend Renovate

    • Configure HikariCP for Spring Boot on Red Hat OpenShift 4

    • OpenShift Pipelines and Test Containers

    What’s up next?

    Learning Path Red Hat AI

    How to run AI models in cloud development environments

    This learning path explores running AI models, specifically large language...
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI