Getting started

Enable Application Performance Automation and configure the required integrations.

📣

Early Access Feature

This feature is in early access. It may undergo changes based on user feedback and continued development. We recommend testing in non-production environments first and welcome your feedback to help us improve.

This guide walks you through enabling Application Performance Automation (APA) and configuring the integrations required to run your first runbook.

By the end of this guide, you will have:

  • Enabled APA on at least one cluster
  • Registered an AI provider
  • Connected a Git repository

Before you start

To complete this guide, you need:

  • A cluster connected to Cast AI
  • An API key from a supported AI provider (OpenAI, Anthropic, or Google Gemini)
  • A personal access token for GitHub or GitLab with the required permissions:
ProviderRequired permissions
GitHubread:discussion, read:org, repo
GitLabapi, write_repository

Enable APA on a cluster

APA must be enabled on each cluster where you want to run runbooks.

  1. In the Cast AI console, navigate to APA > Integrations and select the Clusters tab.

  2. Find the cluster you want to enable and click Enable APA, or click Connect cluster to onboard a new cluster.

📘

Note

APA runs on a single cluster but operates org-wide. The cluster you select hosts the APA agent, which can fix images and create PRs for workloads across all clusters in your organization. You only need to enable APA on one cluster.

  1. In the feature selection dialog, ensure Application Performance Automation (APA) is selected.

  2. Run the provided script in your cluster.

  3. Once complete, the cluster appears with an Enabled status in the Clusters tab.

Enable Cast AI features dialog with APA selected
  1. Verify that the castai-apa-runbook-operator component is running in your cluster:

    kubectl get pods -n castai-agent

    You should see the APA runbook operator among the Cast AI components:

    NAME                                                  READY   STATUS    RESTARTS   AGE
    castai-agent-77cf954b4-57p9n                          2/2     Running   0          3h11m
    castai-apa-runbook-operator-778c68645d-6b6c5          1/1     Running   0          1h36m
    ...

Register an AI provider

APA agents use AI models to analyze code and generate fixes. You must register at least one provider before configuring runbooks. Supported providers are OpenAI, Anthropic, and Google Gemini.

  1. Navigate to APA > Integrations and select the Integrations tab.

  2. In the AI Providers section, click Register provider.

  1. Complete the registration form:
FieldDescription
LLM providerSelect your AI provider.
ModelsSelect one or more models to make available to APA.
Provider nameEnter a unique name for this configuration (for example, openai).
API keyEnter your provider API key. Cast AI stores only the last 4 characters for reporting.
Free credits(Optional) If your account has free credits, enter the amount to track usage.
  1. Click Register provider.

Register an LLM provider dialog

The provider appears in the Managed models table. You can register multiple providers if needed.

📘

Note

APA routes requests through Cast AI's AI Enabler, which provides usage analytics. Visit the AI Enabler page to view your model usage and costs.

Connect a Git repository

APA agents need access to your Git repositories to read source files and create pull requests.

  1. In the Integrations tab, locate the Git credentials section, then click Configure Git access.

  1. Select your Git provider: GitHub or GitLab.

  2. Enter a Credential name to identify this connection (for example, github-production).

  3. Choose an authentication method:

Token authentication — Provide a personal access token directly. The token is encrypted and stored securely.

FieldDescription
Personal access tokenA token with the required permissions (see Before you start).

Kubernetes secret authentication — Reference a secret stored in your cluster.

FieldDescription
Secret nameName of a secret in the castai-agent namespace containing the token.

The secret must contain a key named GITHUB_TOKEN (for GitHub) or GITLAB_TOKEN (for GitLab).

  1. Click Save.

Configure Git access dialog

The repository appears in the credentials list with a Connected status.

Next steps

With APA enabled and integrations configured, you're ready to set up your first runbook: