Skip to main content
Workflows run automated tasks on your cost data from the Workflows page in the CostGraph dashboard. In a self-hosted deployment, they run as Claude agents in your own Anthropic account, and they read your costs through your CostGraph MCP server.

Before you begin

Workflows need Anthropic to reach your MCP hostname over the internet. An installation without internet access can’t run workflows.

Get an Anthropic API key

Workflows use Claude Managed Agents, which is available to every Anthropic API account.
  1. Sign in to the Claude Console, or create an account.
  2. Open the API keys page and click Create key.
  3. Set Linked account to a service account, so the key keeps working when the person who created it leaves your organization. Scope it to a workspace if you use more than one.
  4. Choose an expiration. A key that expires stops workflows until you store a new one, so pick Never if you rotate keys yourself.
  5. Copy the key, which starts with sk-ant-. The Console shows it a single time, when you create it.
Usage is billed to that Anthropic account. Managed Agents keeps session history on Anthropic’s side, so it isn’t covered by Zero Data Retention or a HIPAA Business Associate Agreement. See Anthropic’s documentation.

Turn on workflows

1

Store the API key in a Secret

2

Add the Secret to your values file

Workflows are on by default. To turn them off, set backend.automation.enabled: false.
3

Upgrade the release

Run helm upgrade with your values file. The Workflows page is ready after the backend restarts.

Workflow agent initialization

The first time the backend starts with a key, it creates the workflow agents in your Anthropic account. Later restarts reuse those agents. When an upgrade changes an agent, the backend publishes a new version of it. Anthropic bills workflow usage to the account that owns the API key.

Run workflows in your cluster

A workflow can run the commands its agent executes in a sandbox in your own cluster. Sandboxes take their work from a relay that the chart runs next to the backend. The relay polls a self-hosted environment in your Anthropic account and serves the sandboxes on its own https hostname.
1

Create a self-hosted environment

In the Claude Console, in the workspace your API key belongs to, create a self-hosted environment and an environment key for it. Copy the environment ID, which starts with env_, and the key.
2

Add the environment key to your Secret

Add the key to the Secret named in backend.automation.existingSecret as RELAY_ENVIRONMENT_KEY.
3

Turn on the relay

Give the relay its own hostname, add it to ingress.tls, and point DNS for it at your ingress. Sandboxes must be able to reach it. The relay keeps a connection open for as long as a session runs, so raise your ingress controller’s timeouts for it. This example uses ingress-nginx annotations.
agentRelay.deployment.envFrom.automation.name must match backend.automation.existingSecret.
4

Upgrade and create a worker key

Run helm upgrade with your values file, then restart the backend so it picks up the relay.
In your CostGraph dashboard, create an API key with the sandbox:worker scope and store it in a Secret.
5

Turn on the agent runtime

Point the runtime at your relay and upgrade again.
relayUrl must be https:// followed by agentRelay.host. To run sandboxes on a managed sandbox provider instead of Jobs in the cluster, see Run workflows on a managed sandbox provider.
6

Pick the cluster for a goal

Open a goal and choose your cluster, listed under the workerName you set, in its Sandbox setting.
Each session runs as a Job in the release namespace. See Run workflows in your environment to change the sandbox image, resources and network access.

Troubleshoot sandboxes

Add other Secrets to the backend

To pass any other Secret to the backend, list it under backend.deployment.envFrom. Each entry exposes every key in the Secret as an environment variable.
To pass a single key, use backend.deployment.env.

Troubleshoot setup

When workflows are on but not set up, the Workflows page shows “Workflows are not set up yet” and links to this guide. Check the cause that matches your installation. After you fix the cause, restart the backend.