AgentConnect
Kubernetes

Deploy with Helm

Deploy AgentConnect OSS with the official Helm chart and run agents in isolated Kubernetes sandboxes.

The official AgentConnect Helm chart is the production OSS deployment option. It installs the Web console, Control Plane, Setup Server, Relay, connector gateway, and a cluster-wide daemon pool. Agent runtimes run in isolated agent-sandbox pods with persistent workspaces instead of on an operator's machine.

For a local evaluation, use the Docker Compose quick start. Use this guide when you want the cluster to manage agent execution and workspaces.

The chart is published as an OCI artifact at oci://ghcr.io/agentconnect-md/charts/agentconnect. Its version matches the AgentConnect release without the leading v, and its default image tags match that release.

Before you start

You need:

  • Kubernetes 1.28 or newer
  • Helm and kubectl access to the cluster
  • linux/amd64 worker nodes for the current first-party images
  • A PostgreSQL database reachable from the AgentConnect namespace
  • A dynamic volume provisioner and a StorageClass for agent workspaces
  • Permission to install CRDs, cluster-scoped RBAC, and the agent-sandbox controller
  • For public access: a Gateway API controller, an existing Gateway, DNS, and TLS

The chart creates HTTPRoute resources, but it doesn't install a Gateway API controller, create the Gateway, or manage DNS and certificates. You can set route.enabled: false and provide your own ingress instead.

Choose an AgentConnect release that includes the chart (v1.44.0-rc.58 or newer) from AgentConnect releases, then verify the artifact. Omit the release tag's leading v:

export AGENTCONNECT_CHART_VERSION=X.Y.Z

helm show chart oci://ghcr.io/agentconnect-md/charts/agentconnect \
  --version "$AGENTCONNECT_CHART_VERSION"

Every supported value is documented in the chart's values.yaml.

1. Create the namespace and secrets

Create the release namespace:

kubectl create namespace agentconnect

The Control Plane needs a PostgreSQL URL, a stable API-key pepper, and a shared Relay credential:

kubectl -n agentconnect create secret generic agentconnect-secrets \
  --from-literal=DATABASE_URL='postgresql://control_plane:replace-me@postgres.example.test:5432/agentconnect?schema=public' \
  --from-literal=API_KEY_PEPPER="$(openssl rand -hex 32)" \
  --from-literal=RELAY_TOKEN="$(openssl rand -hex 24)" \
  --from-literal=OPEN_CONNECTOR_ENCRYPTION_KEY="$(openssl rand -hex 32)"

API_KEY_PEPPER is effectively permanent: rotating it invalidates existing daemon and personal API keys. The connector key encrypts connector OAuth credentials in its persistent volume and should be set before creating the first connection. Store these values in your secret manager and use a URL-encoded database password.

The Kubernetes daemon pool uses a separate data-plane configuration file for the durable store of sessions, transcripts, queues, and other execution data shared by pool members. Save this as data-plane.json:

{
  "version": 1,
  "databaseUrl": "postgresql://daemon_pool:replace-me@postgres.example.test:5432/agentconnect",
  "maxConnections": 4
}

Create the Secret from that file:

kubectl -n agentconnect create secret generic agentconnect-data-plane \
  --from-file=config.json=./data-plane.json

The Control Plane and daemon pool can share the same PostgreSQL service. Keep their credentials separate so you can scope and rotate them independently, and back up both control and execution data.

2. Create the values file

Start with a small override file instead of copying the full chart defaults. Save this as agentconnect-values.yaml and replace the example hosts, Gateway listener, and StorageClass:

publicUrl: https://app.example.test

# Configure this before the first install so Setup uses the intended issuer and Management API.
logto:
  endpoint: https://login.example.test
  # Set this separately when a custom login domain does not serve the Management API.
  mgmtEndpoint: https://tenant.example.test

route:
  # Keep the deployment private until Logto sign-in is configured.
  enabled: false
  gateway:
    name: public-gateway
    namespace: default
    sectionName: https

daemonPool:
  # The chart creates this namespace with restricted Pod Security labels and default-deny networking.
  sandboxNamespace: agentconnect-agents
  runtime:
    workspace:
      storageClass: standard
      size: 10Gi

# The default-on connector gateway persists its own SQLite database in a separate PVC.
openConnector:
  persistence:
    storageClass: standard

publicUrl is the final browser origin. In the default same-origin topology, the console is served at /, the Control Plane at /cp, and Relay paths on the same host. The chart also supports dedicated apiHost, mcpHost, and relay.host values when you need separate public origins.

The daemon pool defaults to three members and three pre-warmed runtime sandboxes. Each warm sandbox runs a pod and keeps a workspace PVC. Set daemonPool.runtime.warmReplicas: 0 if you prefer lower standing cost over faster first-agent startup.

The default runtime image includes Claude Code, Codex, DeepSeek Harness, and OpenCode. To use the published full image with Qwen Code and other ACP runtimes, see Runtime authentication.

Run Logto in the cluster

The chart doesn't deploy Logto. Whether you use Logto Cloud or run Logto in the same cluster, the two logto values above are the only startup settings AgentConnect needs. Everything else for sign-in is configured in Setup Server.

For an in-cluster Logto, set endpoint to the browser-facing origin and mgmtEndpoint to the in-cluster Service origin:

logto:
  endpoint: https://login.example.test
  mgmtEndpoint: http://logto.agentconnect.svc.cluster.local

Three details are required for this setup to work:

  • Expose Logto's container port behind a Service on port 80. Logto constructs its advertised URLs from the incoming request, so an in-cluster address with an explicit port puts that port into OIDC discovery responses. A port 80 Service targeting the container keeps mgmtEndpoint port-less and keeps advertised URLs aligned with your public origin.
  • Set TRUST_PROXY_HEADER on Logto and send X-Forwarded-Proto: https. When TLS terminates in front of your Gateway, the in-cluster hop is plain HTTP. Without that header, Logto advertises an http:// issuer and OIDC discovery fails. In Gateway API, add a RequestHeaderModifier filter on the route.
  • Don't expose Logto's admin console on a public route. Access it with kubectl port-forward, just like Setup Server, and set its admin endpoint to that local origin.

Whichever deployment you use, the Management API resource identifier is always https://default.logto.app/api. It's a fixed identifier, not a URL your deployment serves.

Encrypt stored application secrets

By default, write-only provider and agent secrets are stored as plaintext in PostgreSQL. Before entering production credentials in Setup or the console, configure a Vault Transit key and a Kubernetes-auth role bound to the chart's agentconnect-control-plane ServiceAccount. Then add the cipher settings to your values file:

controlPlane:
  config:
    SECRET_CIPHER: vault-transit
    VAULT_ADDR: https://vault.example.test
    VAULT_TRANSIT_KEY: agentconnect-cp
    VAULT_JWT_ROLE: agentconnect

Setup Server uses the same ServiceAccount and cipher configuration by default, so both processes encrypt and decrypt the same values. See Secret storage for the Transit policy and migration steps.

Model credentials for every agent

See Runtime authentication for API-key setup, runtime-specific Secret mappings, and gateway endpoints. The same mapping feeds both the pool health probe and agent sessions.

Agents in the pool need a model provider credential. Per agent or per organization, you provide this as a variable or secret matching what the runtime expects (ANTHROPIC_API_KEY, OPENAI_API_KEY, or DEEPSEEK_API_KEY). If your deployment shares one provider key across all agents, configure it once in a Secret referenced by the chart:

kubectl -n agentconnect create secret generic agentconnect-model-credentials \
  --from-literal=DEEPSEEK_MODEL_TOKEN='replace-me' \
  --from-literal=DEEPSEEK_MODEL_BASE_URL='https://api.deepseek.com'
daemonPool:
  modelCredentials:
    existingSecret: agentconnect-model-credentials

The Secret's entries are the environment variables: <PREFIX>MODEL_TOKEN and <PREFIX>MODEL_BASE_URL, where the prefix is ANTHROPIC_ for Claude, OPENAI_ for Codex, DEEPSEEK_, or empty for the shared fallback. OpenCode reuses these same three provider-specific pairs for Anthropic, OpenAI, and DeepSeek with no extra mapping. The example above uses DeepSeek's documented API root.

A token with no base URL uses that provider's default endpoint. Agent pods receive only a placeholder value while the daemon pool makes the actual provider calls, so the daemon pool needs outbound HTTPS access to the provider (see Runtime authentication). A base URL with no token points a runtime at an endpoint that issues its own credentials. For Qwen Code and other ACP runtimes, map their API-key variables with daemonPool.runtimeEnvironment as shown in the runtime authentication guide.

Two rules apply:

  • This Secret is the only source allowed for these variables. Setting any of them in daemonPool.extraEnv, or letting modelEgress.clients render them, fails at install time. Each token and base URL pair must come from the same source so a Secret with only a token can't combine with a stray base URL and send a real provider key to the wrong endpoint.
  • Values in this Secret take precedence over an agent's own variable of the same name, for the same reason. Leave modelCredentials unset if you want agents to use their own keys.

Object store: Source Cache and file transfer

An S3-compatible object store enables two features:

  • Source Cache: New sandboxes start their Git clone from a bundle in the store instead of fetching the entire repository from its origin. Sandbox pods don't have bucket credentials, only short-lived signed links for single objects.
  • Console file transfer: Users can attach any file to a Playground message, and the console can download large or binary workspace files. File bytes transfer directly between the browser, the daemon or its pod, and the store. The Control Plane only signs the links. This works for every daemon, including self-hosted daemons outside the cluster.

Without an object store, both features stay off: clones fetch from the origin, only images can be attached, and workspace downloads pass through the Control Plane with an 8 MiB per-file limit.

Bundled store

The chart can run a single RustFS pod backed by a PersistentVolumeClaim. Give it a public hostname:

sourceCache:
  store:
    host: objects.example.test
    persistence:
      size: 50Gi
      storageClass: standard

Signed links must use https://, so the store is served through the Gateway on its own host. Provision DNS, TLS, and a Gateway listener for that host just like publicUrl. Your edge proxy must preserve the Host header (which every signature covers) and allow request bodies up to the largest bundle size (sourceCache.limits.maxBundleBytes, default 2Gi). The chart creates the store's route only when route.enabled is true.

The chart generates the store's key pair in the Secret agentconnect-source-cache-store and preserves it across upgrades. A post-install and post-upgrade Job creates the bucket, its lifecycle rules, and a CORS rule for publicUrl. It's safe to rerun.

After you publish the route in step 4, restart the daemon pool once so its members pick up the lifecycle rules right away instead of waiting for their next 6-hourly check:

kubectl -n agentconnect rollout restart deployment/agentconnect-daemon-pool
curl https://objects.example.test/health

External bucket

To use your own bucket instead, set sourceCache.enabled: true with its location and credentials. This takes precedence over the bundled store:

sourceCache:
  enabled: true
  endpoint: https://s3.example.test
  # Set only when browsers and out-of-cluster daemons reach the bucket at another origin.
  publicEndpoint: ''
  region: us-east-1
  bucket: agentconnect-source-cache
  forcePathStyle: true
  credentials:
    source: secret
    secret:
      name: agentconnect-source-cache

The Secret contains AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, mounted as files. On EKS, use credentials.source: serviceAccount with a roleArn instead. The IAM role must trust both the daemon pool's and the Control Plane's ServiceAccounts. Leave endpoint empty to use the AWS regional endpoint.

The chart and AgentConnect don't configure external buckets automatically. Apply these settings yourself:

  • Lifecycle rules under <prefix>/src/: Expire ac-cache=pending after 2 days and ac-cache=unreferenced after 7 days. Without them, pool members stop writing bundles and the Control Plane refuses transfers. Both log the exact rule JSON to apply.
  • A CORS rule: Allow publicUrl for GET and PUT, with the content-type, x-amz-checksum-sha256, and x-amz-tagging headers.
  • Permissions: Grant s3:GetObject, s3:PutObject, s3:DeleteObject, and s3:PutObjectTagging on <prefix>/src/*, plus s3:GetLifecycleConfiguration on the bucket.

See the chart's Source Cache reference for the exact rule and CORS documents, AWS and MinIO commands, and all limits.

3. Install AgentConnect

Install the version you verified:

helm upgrade --install agentconnect \
  oci://ghcr.io/agentconnect-md/charts/agentconnect \
  --version "$AGENTCONNECT_CHART_VERSION" \
  --namespace agentconnect \
  --values agentconnect-values.yaml \
  --wait \
  --timeout 15m

On a fresh cluster, Helm installs the four agent-sandbox CRDs before the release, and the chart installs the pinned controller stack. The chart also creates the dedicated agents namespace, the daemon pool's TokenReview RBAC, the SandboxTemplate, and the warm pool.

Check the rollout:

kubectl -n agentconnect get pods
kubectl -n agentconnect-agents get pods,pvc
kubectl -n agentconnect logs deployment/agentconnect-control-plane -c migrate

The migration container should exit cleanly, application pods should become Ready, and the agents namespace should contain the pre-warmed sandbox pods and PVCs.

4. Configure sign-in before publishing the route

Setup Server has no Service or public route by design. Forward it to your workstation:

kubectl -n agentconnect port-forward deployment/agentconnect-setup-server 8091:8091

Open http://localhost:8091, connect Logto, configure the browser application and first social provider, and claim the initial administrator. Follow Sign-in for the application, API Resource, and provider steps.

The initial values file already passes the Logto endpoint to Setup. For Logto Cloud behind a custom login domain, keep logto.endpoint on that login origin and logto.mgmtEndpoint on the tenant's canonical Management API origin.

After saving deployment settings in Setup, restart the services that load them at startup. Restart the Control Plane first, and wait until it's Ready before restarting the others:

kubectl -n agentconnect rollout restart deployment/agentconnect-control-plane
kubectl -n agentconnect rollout status deployment/agentconnect-control-plane

kubectl -n agentconnect rollout restart \
  deployment/agentconnect-web \
  statefulset/agentconnect-relay

The order matters because the console fetches its sign-in configuration from the Control Plane at startup. If it restarts while the Control Plane is still serving the previous configuration, the console caches the old state and shows no sign-in button. Waiting for the Control Plane rollout avoids this; if it happens, restart the console again.

Wait for the rollout, change route.enabled to true in agentconnect-values.yaml, and upgrade the release:

helm upgrade agentconnect \
  oci://ghcr.io/agentconnect-md/charts/agentconnect \
  --version "$AGENTCONNECT_CHART_VERSION" \
  --namespace agentconnect \
  --values agentconnect-values.yaml \
  --wait \
  --timeout 15m

Confirm the route attached to the intended Gateway:

kubectl -n agentconnect get httproute
kubectl -n agentconnect describe httproute agentconnect

If the parent Gateway is in another namespace, its listener must allow routes from the AgentConnect namespace.

5. Run the first agent

Open the final Web URL and sign in. The daemon pool registers itself as Kubernetes cluster, so you don't need to copy an Add daemon command or install the host CLI.

Create an agent, choose Kubernetes cluster, and select one of the runtimes reported by the runtime-sandbox image. Provide the model credential that runtime expects, either per agent or organization as a variable or secret, or once for the whole install as described in Model credentials for every agent. Then send a message in the Playground and confirm the agent gets a sandbox and persistent workspace.

Next

How is this guide?

On this page

How is this guide?