Before you begin
- An Anthropic API key. See Get an Anthropic API key.
- Graph AI turned on, with
graphAi.mcp.hostset to a publichttpshostname that Anthropic can reach. See Connect MCP clients.
Get an Anthropic API key
Workflows use Claude Managed Agents, which is available to every Anthropic API account.- Sign in to the Claude Console, or create an account.
- Open the API keys page and click Create key.
- 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.
- Choose an expiration. A key that expires stops workflows until you store a new one, so pick Never if you rotate keys yourself.
- Copy the key, which starts with
sk-ant-. The Console shows it a single time, when you create it.
Turn on workflows
1
Store the API key in a Secret
2
Add the Secret to your values file
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 ownhttps 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 In your CostGraph dashboard, create an API key with the
helm upgrade with your values file, then restart the backend so it picks up the relay.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.Troubleshoot sandboxes
Add other Secrets to the backend
To pass any other Secret to the backend, list it underbackend.deployment.envFrom. Each entry exposes every key in the Secret as an environment variable.
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.