> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sizing and requirements

> How much cluster a self-hosted xpander needs: base footprint, calculator, executor capacity and storage.

A self-hosted install has three footprints:

| Footprint | What it is | Sized by | Section |
| - | - | - | - |
| **base services** | The web UI, control plane and data tier | The deployment (Hybrid or Air-Gapped) | [Base footprint](#base-footprint) |
| **agent workspace pod** | A pod created on demand for an agent whose harness is **xpander** and that uses a workspace | Concurrently active workspaces | [Agent workspaces](https://docs.xpander.ai/self-hosted/sizing-runtime.md#agent-workspaces) |
| **executor fleet** | A shared pool of warm pods where every Claude Code, Codex and OpenCode turn runs | Concurrent turns | [The executor fleet](https://docs.xpander.ai/self-hosted/sizing-runtime.md#the-executor-fleet) |

The turns of every Claude Code, Codex and OpenCode agent land on the fleet, however the agent was created. Two kinds of agent do not. An agent whose harness is **xpander** runs on the execution tier (`agent-worker`), and on a workspace pod when it uses one. An SDK agent runs its loop in your own process.

Executor and workspace internals, node prerequisites, Landlock, autoscaling, rollouts, images and egress are on [Runtime and node reference](https://docs.xpander.ai/self-hosted/sizing-runtime.md).

## Base footprint

### Hybrid

The installer shows the same minimums, published at [charts.xpander.ai/requirements.json](https://charts.xpander.ai/requirements.json).

| | Hybrid minimum |
| - | - |
| Nodes | 3 × 4 vCPU / 16 GiB (e.g. `m5.xlarge`) |
| Storage | \~550 GiB: a 500 GiB agent volume plus \~30 GiB for the databases, and 20 GiB for the Company Brain while it is on (the default). For a small install, lower the agent volume with `fleet.storage.size` |
| Kubernetes | ≥ 1.28 |
| Architecture | amd64 |
| Network | Egress to `deployment-manager.xpander.ai` (or PrivateLink) and to your LLM providers |
| Extras | Ingress controller + wildcard DNS optional |

Size for tasks running **concurrently at peak**, whatever triggers them. In xpander cloud production only \~5% of executions are interactive chat. The rest come from schedules, webhooks, the API and other agents.

| Concurrent tasks | Agents | Cluster capacity | Example nodes | Persistent storage |
| - | - | - | - | - |
| 3 | 10 | 12 vCPU / 27 GiB | 3 × `m5.xlarge` | \~130 GiB |
| 10 | 25 | 22 vCPU / 42 GiB | 3 × `m5.2xlarge` | \~200 GiB |
| 20 | 50 | 32 vCPU / 57 GiB | 4 × `m5.2xlarge` | \~330 GiB |
| 50 | 100 | 68 vCPU / 112 GiB | 9 × `m5.2xlarge`, enable autoscaling | \~590 GiB |

Capacity includes \~50% headroom over pod requests for bursts, system pods and node upgrades. Capacity and storage cover the base services and workspaces. Add the executor fleet on top: each executor requests 2 vCPU / 8 GiB and has a 500 GiB volume (see [Capacity Planning](#capacity-planning)).

#### Sizing calculator

Enter peak concurrent tasks, agents, and how many use a workspace.

> [accordion] How the estimate works
>
> The calculator applies the same model we use to size xpander cloud:
>
> 1. **Concurrent tasks** is the primary driver. A task is any agent execution, from any source: chat, API calls, schedules, webhooks, MCP clients, Slack, or another agent. If you don't know your peak concurrency yet, **assume one concurrent task per agent** - that covers most production organizations we measured. In practice most teams peak at just a few concurrent tasks (typically under 5), and even the busiest organization peaks around 30.
> 2. **Execution replicas** (`agent-worker`) = concurrent tasks ÷ 4 (each replica processes 4 tasks by default, configurable with `MAX_CONCURRENT_EXECUTIONS`). Each replica requests 2 vCPU / 2.5 GiB.
> 3. **Agent Controllers**: 1 replica up to \~8 concurrent tasks, 2 up to \~20, 3 beyond. Each requests 1 vCPU / 2 GiB.
> 4. **Active workspaces** = concurrent tasks × workspace share, capped at the agent count. Budget \~0.5 vCPU / 1 GiB per active workspace. That is the measured typical load, and each can burst to its 2 vCPU / 3 GiB limit.
> 5. **Fixed base** (\~3.75 vCPU / 11 GiB): `ai-gateway` (registration only), MCP, Code Runner, AWS Operator, API, Redis, PostgreSQL, container registry and metrics-server at one replica each, plus the Company Brain's `brain-ingest` (1 vCPU / 4 GiB; drop it with `brain.enabled=false`). Add the AI Gateway's two pods (0.5 vCPU / 1 GiB requested each).
> 6. **Cluster capacity** = requests × 1.5 for burst, DaemonSets, and safe node drains. **Storage** = 68 GiB of chart volumes (48 GiB without the Company Brain) + 5 GiB per agent (an upper bound for workspace volumes; only an agent whose harness is **xpander** and that uses a workspace keeps one) + image cache per node.
> 7. **Executor fleet**, where Claude Code, Codex and OpenCode turns run, is not in the estimate. Each executor requests 2 vCPU / 8 GiB and has a 500 GiB volume. Add it from [Capacity Planning](#capacity-planning).

> [accordion] Per-service requirements
>
> Per-replica values. **Defaults** are what the Helm chart applies out of the box. The **recommended** values raise the ones we found low against measured production usage.
>
> | Service | CPU request | Memory request | CPU limit | Memory limit | Notes |
> | - | - | - | - | - | - |
> | Agent Controller | 1000m | 2 Gi | 3000m | 4 Gi | Orchestrator; observed steady-state memory is \~1.5-2 GiB, and the limit carries headroom for peaks |
> | Execution tier (`agent-worker`) | 2000m | 2.25 Gi → **2.5 Gi** | 4000m | 3 Gi | Scale replicas for task concurrency, not size |
> | API | 100m → **250m** | 256 Mi → **1 Gi** | - → **2000m** | - → **1.5 Gi** | Chart sets no limits; observed usage \~0.9-1.4 GiB |
> | MCP | 200m | 750 Mi | 400m | 1 Gi | |
> | `ai-gateway` (registration only) | 200m | 400 Mi | 400m | 600 Mi | |
> | Code Runner | 400m | 800 Mi | 800m | 1229 Mi | Runs privileged (Docker-in-Docker); each concurrent code execution adds up to 1 vCPU / 2 GiB |
> | AWS Operator | 200m | 400 Mi | 400m | 600 Mi | Optional component |
> | AI Gateway (`llm-gw`) | 500m | 1 Gi | 1000m | 4 Gi | Always on. 2 pods (1 on a single-node cluster installed with `install.sh`), HPA 2 to 20 on CPU (`llm-gw.autoscaling`); scale out, never up. No database of its own |
> | Company Brain (`brain-ingest`) | 1000m | 4 Gi | 4000m | 10 Gi | On by default (`brain.enabled`). amd64 nodes only, \~5.2 GB image. Each replica embeds about 1.2 sections per second on 4 cores; add replicas (`brain.ingest.replicas`) for bulk loads |
>
> Override any of these in your Helm values (keys are camelCase):
>
> ```yaml theme={"dark"}
> resources:
>   agentController:
>     requests:
>       cpu: "1000m"
>       memory: "2Gi"
>     limits:
>       cpu: "3000m"
>       memory: "4Gi"
> ```
>
> > [!TIP]
> >
> > The AI Gateway (`llm-gw`) has a Horizontal Pod Autoscaler on by default. Agent Controller, `ai-gateway`, the execution tier (`agent-worker`) and MCP get one when you turn on their `autoscaling` values. An HPA needs metrics-server in the cluster. GKE and AKS install it. Amazon EKS does not: add the Metrics Server community add-on, and check with `kubectl get deployment metrics-server -n kube-system`. The chart's `metricsServer.enabled` is for local clusters only.

### Air-Gapped

| | Air-Gapped minimum |
| - | - |
| Nodes | 3 × 8 vCPU / 32 GiB (e.g. `m5.2xlarge`), amd64 |
| Storage | \~700 GiB on an RWO StorageClass, encrypted at rest: a 500 GiB agent volume plus the databases. For a small install, lower the agent volume with `global.fleet.storage.size` |
| Kubernetes | ≥ 1.28, with a CSI driver and a default RWO StorageClass |

The full prerequisite list (network, license files, registry, tooling) is on [Air-Gapped: Prerequisites](https://docs.xpander.ai/self-hosted/airgap.md#prerequisites).

#### Sizing tiers

Air-Gapped runs everything in-cluster: the execution tier (`agent-worker`) **plus** the control plane, the web UI, the Supabase stack (its own PostgreSQL 15, auth, storage, edge functions) and MongoDB.

| Tier | Nodes | Fits | Storage (PVC) |
| - | - | - | - |
| Initial deployment | 3 × (8 vCPU / 32 GiB) | \~10 users, 5–10 concurrent agent runs | \~700 GiB |
| Production | 5 × (16 vCPU / 64 GiB) | \~50 users, 30–50 concurrent agent runs, headroom | \~1 TiB |
| + GPU (only if needed) | +1 GPU node (L4/A10 class, 8 vCPU / 32 GiB) | Local voice STT; in-cluster LLM inference is your own pool, sized separately by model | + model weights |

> [accordion] Storage breakdown at the production tier
>
> | Volume | Size |
> | - | - |
> | Agent volume | 500 GiB per executor |
> | Supabase PostgreSQL | 50 GiB |
> | xpander's PostgreSQL | 50 GiB |
> | Supabase Storage | 50 GiB+ |
> | MongoDB | 20 GiB |
> | Redis | 8 GiB |
> | Registry | \~50 GiB |
> | Mirror caches | 50–100 GiB |

All are RWO, on one StorageClass. The chart's preflight verifies it exists.

You can bring managed stores instead of the in-cluster data tier.

> [accordion] External data tier and replica counts
>
> **External data tier.** You can bring managed stores instead ([Data Tier](https://docs.xpander.ai/self-hosted/airgap-configure.md#data-tier-in-cluster-or-external)). A reference customer install uses:
>
> * RDS PostgreSQL 16 on `db.t4g.small` with 50 GiB gp3
> * MemoryDB on `db.t4g.small` with one shard and one replica
> * S3 as the Supabase Storage backend for blobs
>
> With external stores, xpander's PostgreSQL, Redis and storage PVCs above fall away.
>
> Most services run one replica. deployment-manager, actions and the Supabase edge runtime ship at ×2 with soft anti-affinity. For production, also run `agent-controller`, `agent-worker`, `api`, `agents` and `functions` at ×2.

#### Scaling with usage

The chart ships **fixed replica counts and no autoscalers**. Scaling policy is yours, and node capacity is the real ceiling.

> [accordion] What grows, how to scale it, and node capacity
>
> | What grows | Grows with | How to scale it |
> | - | - | - |
> | **`agent-worker`**: executes agent tasks | Concurrent agent runs. Each replica runs up to 4 tasks at once (`MAX_CONCURRENT_EXECUTIONS`); beyond `replicas × 4`, tasks queue | Raise `agent-worker.replicas`. It is stateless, so adding replicas is always safe. Don't autoscale it on CPU: a replica waiting on a model looks idle when it is full. Scale on **runs waiting to start** (a queue in xpander's Redis), for example with [KEDA](https://keda.sh) |
> | **Agent workspace pods** (`sb-*`): the agents' computers | Number of agents with an active workspace: one pod + PVC each, created on demand by agent-controller and reaped when idle | Not a Deployment you own, so not HPA territory: this is **node capacity**. Size headroom for your expected concurrent workspaces, or run a node autoscaler |
> | **Executor fleet** (the `fleet-executor` StatefulSet), where agent turns run | Peak concurrent turns. One executor per node, 12 turn slots (8 GiB / 4 vCPU ceiling each; the chart's `global.fleet.turnsMax` and `global.fleet.turn` values, which override the image's own default of 6 turns and 16 GiB per turn), 500 GiB XFS volume with a per-agent quota; idle agents cost only disk | `global.fleet.replicas` (fixed capacity, the sealed-network posture), or KEDA with `global.fleet.keda.enabled` (mirror KEDA with `image_sync.sh --with-keda`). Prerequisites and capacity tables: [the executor fleet](https://docs.xpander.ai/self-hosted/sizing-runtime.md#the-executor-fleet) |
> | **Code-execution Jobs**: spawned per run by the actions service | Bursts of agent code execution | Node capacity, same as workspaces |
> | **Request path**: `api`, `agent-controller`, `agents`, `functions` | Users and API traffic; `functions` also runs CPU-heavy local embedding during knowledge-base ingest | Raise ` .replicas`; standard CPU-based HPA works here **if you install metrics-server** (not required otherwise) |
>
> **Node capacity** is the real ceiling, because workspaces and code-execution Jobs create pods on demand. Two postures:
>
> * **Static capacity**: size the node group for peak and leave it fixed. Simplest, fully offline, recommended for sealed networks.
> * **Cluster Autoscaler**: adds nodes when pods can't schedule. It works in a no-internet VPC if your cloud's scaling API is reachable (on AWS, the `autoscaling` and `ec2` VPC endpoints).
>
> Karpenter does not fit sealed networks: it fetches instance pricing from the internet.

## Capacity planning

Plan in **memory-backed executors**: 10 slots on a 16 vCPU / 128 GiB node (for example `r6i.4xlarge`), with executor memory raised so each turn's 8 GiB is backed. The rest covers the kubelet, DaemonSets, the 4 GiB `/dev/shm` and the 20 GiB package cache.

| Peak concurrent turns | Executors (10 slots each) | Nodes (16 vCPU / 128 GiB each) | Fleet volumes | Agents the volumes hold at full 20 GiB quota | Also raise |
| - | - | - | - | - | - |
| 10 | 1 | 1 | 1 x 500 GiB | \~25 | nothing |
| 50 | 5 | 5 | 5 x 500 GiB = 2.5 TiB | \~125 | `fleet.keda.maxReplicas: 5` (or `replicas: 5`) |
| 200 | 20 | 20 | 20 x 500 GiB = 10 TiB | \~500 | `maxReplicas: 20` (or `replicas: 20`) and a fixed 20-node group |

> [accordion] Planning notes: slots, volumes, memory, smaller executors
>
> * **Slots, not agents.** One executor serves many idle agents but runs at most `turnsMax` turns at once. Extra turns queue.
> * **Agents per volume** is a ceiling. Most directories stay far below the quota, and clones share one object store per repository, so a 500 GiB volume holds far more than 25 agents in practice.
> * **Memory headroom.** Keep the executor's limit at or below \~80 % of the node, and `turnsMax x 8 GiB` within what the node can back.
> * **Smaller executors are fine.** On the defaults (8 vCPU / 28 GiB, 12 slots) one fits on a 16 vCPU / 32 GiB node, with the risk in the [memory warning](https://docs.xpander.ai/self-hosted/sizing-runtime.md#per-executor). Lower `turnsMax` to 3 or 4 for heavy builds.
> * **Workspace pods are separate**: 0.25 vCPU / 256 Mi request, up to 2 vCPU / 3 GiB while active. See [Agent workspaces](https://docs.xpander.ai/self-hosted/sizing-runtime.md#agent-workspaces).

## Data services and storage

The chart deploys single-replica Redis and PostgreSQL StatefulSets and a container registry alongside xpander:

| Component | Persistent volume (default) | Guidance |
| - | - | - |
| Redis | 8 GiB | Queues, caches, and runtime state. 2-4 GiB of memory is sufficient for a single organization; give the pod a 512 Mi-1 GiB memory request |
| PostgreSQL | 20 GiB | xpander state; grows slowly |
| Container registry | 20 GiB | Stores agent container images built in your cluster |
| Company Brain (`brain-ingest`) | 20 GiB | Original files and parsed pages. Kept on uninstall. `brain.ingest.objectStore.type: s3` uses a bucket instead |

**Baseline storage: 68 GiB** of persistent volumes (48 GiB with `brain.enabled=false`) plus the 500 GiB agent volume per executor, plus the workspace volume of each workspace-using agent ([Agent workspaces](https://docs.xpander.ai/self-hosted/sizing-runtime.md#agent-workspaces)). All volumes use your cluster's default StorageClass unless overridden.

> [accordion] Production checklist
>
> Production checklist:
>
> * **Node types**: x86\_64 only. General-purpose instances with a 1:4 vCPU:GiB ratio (`m5`, `m6i`) fit the workload profile. `t3` burstable instances are fine for evaluation, not for production.
> * **Raise the low defaults**: API memory ([Per-service requirements](#hybrid)) before real load.
> * **Enable autoscaling** for the execution tier (`agent-worker`) once concurrency grows beyond a couple of replicas.
> * **Keep headroom**: pod requests should stay under \~65% of cluster capacity so node upgrades and bursts don't evict workloads.
> * **Storage class**: SSD-backed volumes for Redis and PostgreSQL.

## Air-Gapped vs Hybrid

How the executor fleet differs between the two charts.

> [accordion] Fleet settings: Hybrid and Air-Gapped side by side
>
> | | **Hybrid** | **Air-Gapped** |
> | - | - | - |
> | Fleet values | `fleet.*`, image `images.agentHarness` | `global.fleet.*`, image `global.images.agent-harness` from your mirror, tag or digest pinned |
> | Starting executors | `fleet.replicas: 1` | `global.fleet.replicas: 1` |
> | Fleet token | Generated into the chart's Secret, or `fleet.tokenSecret.existing` | One more key in `xpander-generated-keys` |
> | StorageClass | `createClass: true` renders the EBS gp3 XFS class (`ebs.csi.aws.com`; `ebs.csi.eks.amazonaws.com` on EKS Auto Mode) | `createClass: false`; bring a class that mounts XFS with `prjquota`, or set it to `true` on EKS |
> | KEDA | Install `kedacore/keda` yourself, then `fleet.keda.enabled` | Mirror with `image_sync.sh --with-keda`, install, then `global.fleet.keda.enabled` |
> | CLI updates | Executors update from the npm registry or your `XPANDER_NPM_REGISTRY` mirror | Sealed CLI bundle imported from a PVC (`global.fleet.cliBundle`) |
> | LLM | In-cluster AI Gateway (always on) egresses to Anthropic / Bedrock / your endpoint on keys saved in the organization or set on the install, never xpander's keys; defaulted agents follow the org default LLM, else Anthropic direct | In-network endpoint only; VPC Bedrock via `global.llm.bedrock.baseUrl` (Pod Identity, assume role or bearer token); defaulted agents follow the org default LLM, then `global.harness.defaultModels` / `defaultProviders` |
> | Upgrades | `install.sh upgrade` runs `--atomic`; a running turn holds the roll up to `fleet.executor.drainSeconds`; the idle guard covers a missing class | same, under `global.fleet.executor`; the first install runs without `--wait` |
> | Concurrency cap | `fleet.turnsMax` per executor; no per-organization cap | `global.fleet.turnsMax` per executor |
> | Landlock off switch | `fleet.landlock.enabled: false` | `global.fleet.landlock.enabled: false` |
> | Recommended posture | `fleet.replicas` sized for peak, or KEDA with `maxReplicas` set to the fleet node count | Fixed `replicas` sized for peak (static capacity, no autoscaler), KEDA optional |

## Next steps

> [card] [Install Hybrid](https://docs.xpander.ai/self-hosted/hybrid.md#requirements)
>
> The Hybrid installer.

> [card] [Install Air-Gapped](https://docs.xpander.ai/self-hosted/airgap.md#prerequisites)
>
> The Air-Gapped installer.

> [card] [Set up an EKS cluster](https://docs.xpander.ai/self-hosted/eks-setup.md)
>
> Nodes and StorageClasses.

> [card] [Read the runtime and node reference](https://docs.xpander.ai/self-hosted/sizing-runtime.md)
>
> Executors, Landlock, rollouts and egress.

> [card] [Understand two-file licensing](https://docs.xpander.ai/self-hosted/licensing.md)
>
> Seat and agent caps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.