agent-sandbox

by Dovakiin0

Helm chartv1.0.5App 1.0.2Apache-2.0Verified publisher

All-in-one Helm chart for Kubernetes Agent Sandbox with Controller, Router, Python/Bash Runtime, WarmPools, and LLM Security Hardening.

About this chart

Kubernetes Agent Sandbox Helm Chart

All-in-one Helm chart to deploy and manage Kubernetes Agent Sandbox (a Kubernetes SIGs project). Provides isolated execution sandboxes for AI agents and LLM applications with a high-performance Router, pre-warmed pools, strict network security policies, and client RBAC.


Features

  • Controller & Extensions: Installs the Agent Sandbox controller with CRD support for Sandboxes, SandboxClaims, SandboxTemplates, and SandboxWarmPools.
  • Sandbox Router: High-throughput reverse proxy for routing HTTP & WebSocket traffic directly to running sandboxes.
  • Python & Shell Runtime: Preconfigured default SandboxTemplate equipped with Python 3, Bash, and the sandbox agent daemon.
  • Warm Pools: Low-latency sandbox provisioning with configurable warm replica pools.
  • Security Hardening:
    • automountServiceAccountToken: false (prevents API token exfiltration)
    • Non-root user execution (uid 1000) with all Linux capabilities dropped
    • Support for container isolation runtimes (gVisor, Kata Containers)
    • Strict NetworkPolicy blocking RFC1918 private subnets and cloud metadata endpoints (169.254.169.254).
  • Client RBAC: Pre-configured ClusterRole and ClusterRoleBinding for backend services and AI agent orchestrators.

Prerequisites

  • Kubernetes: >= 1.26.0
  • Helm: >= 3.12.0
  • (Optional) Container isolation runtime such as gVisor (runsc) or Kata Containers configured on worker nodes.

Installation

1. Add the Helm Repository

helm repo add dovakiin0 https://dovakiin0.github.io/agent-sandbox-helm/
helm repo update

2. Install the Chart

Install into a dedicated namespace (e.g. agent-sandbox-system):

helm install agent-sandbox dovakiin0/agent-sandbox \
  --namespace agent-sandbox-system \
  --create-namespace

Configuration Reference

The following table lists the configurable parameters of the chart and their default values:

Controller Settings

ParameterDescriptionDefault
controller.replicaCountNumber of controller replicas1
controller.image.repositoryController image repositoryregistry.k8s.io/agent-sandbox/agent-sandbox-controller
controller.image.tagController image tagv1.0.2
controller.image.pullPolicyImage pull policyIfNotPresent
controller.leaderElectEnable leader election"true"
controller.extensions.enabledEnable extensions controller (warmpools, templates)true
controller.resources.requests.cpuCPU request100m
controller.resources.requests.memoryMemory request128Mi
controller.resources.limits.cpuCPU limit500m
controller.resources.limits.memoryMemory limit512Mi

Router Settings

ParameterDescriptionDefault
router.replicaCountNumber of router replicas2
router.image.repositoryRouter image repositoryus-central1-docker.pkg.dev/k8s-staging-images/agent-sandbox/sandbox-router
router.image.tagRouter image taglatest-main
router.service.typeRouter service typeClusterIP
router.service.portRouter service port8080
router.proxyTimeoutSecondsHTTP proxy request timeout (seconds)180
router.websocketIdleTimeoutSecondsWebSocket idle timeout (seconds)3600
router.websocketMaxLifetimeSecondsWebSocket maximum lifetime (seconds)86400
router.websocketMaxMessageBytesWebSocket max message payload size16777216
router.allowUnauthenticatedAllow unauthenticated proxying"true"
router.topologySpreadConstraints.enabledDistribute across failure zonestrue
router.resources.requests.cpuCPU request100m
router.resources.requests.memoryMemory request256Mi
router.resources.limits.cpuCPU limit1000m
router.resources.limits.memoryMemory limit1Gi

Sandbox Template Settings

ParameterDescriptionDefault
sandboxTemplate.nameName of the default SandboxTemplatepython-bash-template
sandboxTemplate.image.repositoryRuntime image repositoryus-central1-docker.pkg.dev/k8s-staging-images/agent-sandbox/python-runtime-sandbox
sandboxTemplate.image.tagRuntime image taglatest-main
sandboxTemplate.resources.requests.cpuSandbox CPU request250m
sandboxTemplate.resources.requests.memorySandbox memory request512Mi
sandboxTemplate.resources.limits.cpuSandbox CPU limit1000m
sandboxTemplate.resources.limits.memorySandbox memory limit1Gi
sandboxTemplate.persistence.enabledAttach persistent volume claim templatefalse
sandboxTemplate.persistence.sizePVC request size1Gi

Security Hardening

ParameterDescriptionDefault
security.runtimeClassNameContainer isolation runtime (e.g. gvisor, kata-qemu)""
security.runAsUserSandbox container UID1000
security.runAsGroupSandbox container GID1000
security.readOnlyRootFilesystemMount root filesystem as read-onlyfalse

Warm Pools

ParameterDescriptionDefault
warmPool.nameName of the default SandboxWarmPoolpython-bash-warmpool
warmPool.replicasPre-warmed standby sandbox count2
warmPool.updateStrategyWarm pool update strategyOnReplenish

Network Policy & Backend RBAC

ParameterDescriptionDefault
networkPolicy.enabledEnforce strict NetworkPolicy on sandboxestrue
networkPolicy.egress.allowPublicInternetAllow egress to internet (blocking metadata & RFC1918)true
networkPolicy.egress.additionalEgressCustom additional egress rules[]
backendRBAC.enabledDeploy RBAC for backend service managing sandboxestrue
backendRBAC.subjectsList of subjects (ServiceAccounts) to grant RBAC permissions[{"name": "agent-sandbox-backend", "namespace": ""}]

Customizing Values

To customize values during installation:

cat <<EOF > custom-values.yaml
security:
  runtimeClassName: "gvisor"

warmPool:
  replicas: 5

sandboxTemplate:
  resources:
    limits:
      cpu: "2000m"
      memory: "2Gi"
EOF

helm install agent-sandbox dovakiin0/agent-sandbox \
  -f custom-values.yaml \
  --namespace agent-sandbox-system

Upstream Documentation & Resources

Deploy agent-sandbox with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has agent-sandbox on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartagent-sandbox is pinned at v1.0.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply