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

# Agent sandbox for on-premise

> Optional isolated execution of customer Python code on-premise: what the agent sandbox is, how to deploy it, and how to bring your own sandbox template.

<Badge color="blue" size="lg" shape="pill" stroke="true">Feature available with the [Enterprise Plan](https://orq.ai/solutions/enterprise)</Badge>

The agent sandbox runs customer-written Python (custom Python evaluators, agent code tools) in isolated, short-lived pods inside your cluster. It is built on the CNCF [kubernetes-sigs/agent-sandbox](https://github.com/kubernetes-sigs/agent-sandbox) project.

**Sandboxing is optional.** The Helm chart ships with it disabled, and the platform runs fully without it; only features that execute customer Python code are unavailable until a sandbox is installed. The sandbox infrastructure is installed by the cluster administrator, never by the chart, so isolation stays under operator control.

## Components

| Component         | What it is                                                                                                                                                      |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Controller + CRDs | The upstream [agent-sandbox](https://github.com/kubernetes-sigs/agent-sandbox) controller (`v0.4.6`, extensions API enabled), installed with its own Helm chart |
| sandbox-router    | Routes execution requests from the platform to individual sandbox pods                                                                                          |
| SandboxTemplate   | Defines how sandbox pods run: image, resources, network egress, placement                                                                                       |
| Runtime image     | `ghcr.io/orq-ai/agent-sandbox-python-runtime`, listed in the chart's `IMAGES.md` for air-gapped mirroring                                                       |

## Quick deploy

The chart package includes a step-by-step runbook (`AGENT-SANDBOX-PREREQUISITE.md`) and ready-to-adapt manifests in its `agent-sandbox/` folder. In short:

1. Create two namespaces: `agent-sandbox-system` (controller) and `agent-sandbox` (router and sandboxes).
2. Install the [upstream controller](https://github.com/kubernetes-sigs/agent-sandbox) Helm chart with `controller.extensions=true`.
3. Create the runtime image pull secret, then apply `agent-sandbox/python-sandbox-template.yaml` (adapt image tag, node placement, and egress to your cluster).
4. Apply `agent-sandbox/router.yaml`, and `agent-sandbox/network-policy.yaml` if your CNI enforces NetworkPolicies. `agent-sandbox/warm-pool.yaml` optionally keeps pre-provisioned sandboxes ready.
5. Enable the feature in your values and upgrade:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
agentSandbox:
  enabled: true
  networkPolicies: true # if your CNI enforces NetworkPolicies
```

## Bring your own sandbox template

The `SandboxTemplate` is yours to define. The shipped template is a hardened reference (no service account token, dropped capabilities, managed egress policy), but you can substitute your own isolation approach, for example gVisor or Kata runtime classes, or a dedicated tainted node pool. The platform only requires that the template runs compatible runtime image and matches the configured `agentSandbox.templateName` and `agentSandbox.namespace`.

For deployment assistance, contact [support@orq.ai](mailto:support@orq.ai) or reach out to an **Orq.ai** account manager.
