Sandboxes require an Enterprise plan.
Supported platforms
Self-hosted Sandboxes are supported on:- Amazon Elastic Kubernetes Service (EKS)
- Google Kubernetes Engine (GKE)
- Azure Kubernetes Service (AKS)
- Red Hat OpenShift, with the additional steps in Configure OpenShift
- Bare-metal and on-premises Kubernetes clusters that meet the node requirements for bare-metal and on-premises clusters
Self-hosted Sandboxes on Azure require LangSmith Helm chart v17 (
0.17.x).Components
Enabling Sandboxes provisions the following resources:- Sandbox runtime pods that run sandbox workloads on KVM-capable nodes.
- A JuiceFS metadata store backed by Redis and object storage backed by S3, GCS, or Azure Blob Storage.
- Optional wildcard ingress for services exposed from inside Sandboxes.
Prerequisites
1
Install the base LangSmith platform
Install LangSmith on Kubernetes before enabling Sandboxes. See Self-host LangSmith on Kubernetes.Sandboxes run in the same Kubernetes cluster and namespace as the LangSmith release.If your cluster cannot pull from public registries, also mirror the sandbox runtime image. See Additional images for Sandboxes.
2
Add KVM-capable nodes
Your cluster must include dedicated nodes that can run nested workloads with Linux KVM available at If your nodes use different labels or taints, override
/dev/kvm.These can be bare-metal machines or supported cloud instances with nested virtualization enabled. On AWS and GCP, use x86_64 Linux instances that expose /dev/kvm to the sandbox runtime.The default Helm scheduling values expect these nodes to have the following label and taint:sandboxes.sandboxHost.deployment.nodeSelector and sandboxes.sandboxHost.deployment.tolerations.3
Configure JuiceFS storage
Sandboxes require JuiceFS-backed shared storage. You must provide:
- A Redis-compatible metadata store.
- An object storage bucket or bucket root.
- A JuiceFS configuration Secret, or enough Helm values for the chart to create one.
sandboxes.juicefs.storage and sandboxes.juicefs.bucket:Do not use object-store subpaths in
sandboxes.juicefs.name. Use a flat name, such as sandbox-juicefs. JuiceFS stores objects under that name inside the configured bucket.4
Configure sandbox secrets
Sandboxes need additional secret material for service-to-service authentication and callback signing.The callback signing value must be an Ed25519 private JWK. Keep it stable across upgrades.
- Using Kubernetes secrets (recommended)
- Using inline values
If you use
config.existingSecretName, add the sandbox keys to the same LangSmith app Secret. Do not set the secret values directly in Helm.5
Choose a proxy CA mode
The sandbox egress authentication proxy uses this CA for TLS interception and credential injection.The chart supports two proxy CA modes:
In GitOps workflows that render manifests without live cluster access, prefer
existingSecret. The generatedSecret mode uses Helm’s live lookup behavior to reuse the generated Secret on upgrades; pure render workflows cannot read the live Secret and may produce new cert material on each render.Configure OpenShift
On Red Hat OpenShift, the sandbox runtime needs a security context constraint (SCC) that allows privileged containers. The sandbox runtime pods run privileged with host networking because they manage microVMs, network namespaces, and mounts on their node. Other LangSmith components, including the bundled PostgreSQL, Redis, and ClickHouse, run under the defaultrestricted-v2 SCC.
To prepare an OpenShift cluster, complete these steps before you enable Sandboxes with Helm:
1
Add KVM-capable worker nodes
Use bare-metal worker nodes, or virtual machine worker nodes with nested virtualization enabled. To confirm that a node exposes KVM, run:Apply the label and taint that the chart expects:Labels and taints applied to a node do not carry over to a replacement machine. To keep them, set them in the MachineSet that creates your sandbox nodes, under
spec.template.spec.metadata.labels and spec.template.spec.taints.2
Grant the privileged SCC to the sandbox runtime
Grant the built-in The JuiceFS formatter Job runs as the same service account, so it needs no separate grant. If you set
privileged SCC to the sandbox runtime service account only. The chart names this service account <release-fullname>-sandbox-host, which is langsmith-sandbox-host for a release named langsmith:sandboxes.sandboxHost.serviceAccount.name, grant the SCC to that name instead.Node requirements for bare-metal and on-premises clusters
On a managed cloud cluster, the KVM-capable node pool covers these requirements. On bare-metal and on-premises Kubernetes clusters, confirm that each sandbox node and the cluster meet them before you enable Sandboxes with Helm. Each sandbox node needs:- CPU architecture: x86-64 (
amd64). The sandbox runtime does not run on Arm nodes. - Hardware virtualization: Virtualization extensions enabled in the firmware, the KVM kernel module loaded, and
/dev/kvmpresent. - cgroup v2: The unified cgroup hierarchy with the
cpucontroller available. The sandbox runtime uses it to enforce per-sandbox CPU limits. - TUN/TAP and FUSE:
/dev/net/tunfor sandbox network interfaces and/dev/fusefor the JuiceFS mount. - nftables: Kernel support for
iptableswith the nftables backend. The sandbox runtime applies its egress rules inside a network namespace for each sandbox. - Local disk for the JuiceFS cache: A node-local path for
sandboxes.juicefs.hostMount.cacheDirs, which defaults to/var/cache/juicefswith a 50 GiB cache size.
- Privileged pods: The sandbox runtime pods run privileged, with host networking and
hostPathvolumes. If your cluster enforces Pod Security Admission, label the LangSmith namespace to allow privileged pods, for examplepod-security.kubernetes.io/enforce=privileged. - Node port reachability: The LangSmith platform backend connects to each sandbox node on TCP port
19190. Allow this traffic from the LangSmith pods to the sandbox nodes, and keep the port on private networks. - Outbound access: Sandbox nodes need network access to the JuiceFS Redis metadata store, the object storage backend, and the destinations that sandboxes call. To send sandbox egress through a corporate HTTP proxy, set
sandboxes.authProxy.httpProxy.
Use S3-compatible object storage
On clusters without cloud workload identity, JuiceFS can store sandbox data in an S3-compatible object store, such as MinIO, using static access keys.S3-compatible object storage with static keys requires LangSmith application version 0.17.35 or later.
sandboxes.juicefs.existingSecretName to its name:
access-key and secret-key. JuiceFS stores the keys in its Redis metadata store, so restrict access to that Redis instance.
The object store must sustain the sandbox runtime’s write throughput. When object storage writes stall, the JuiceFS mount health check fails and the sandbox runtime pod restarts, which interrupts the Sandboxes on that node.
Enable with Helm
Enable Sandboxes by setting Helm values directly, as shown in this section. On AWS and GCP, you can instead enable Sandboxes with Terraform, which provisions the infrastructure and generates the Helm values. Add the following values to yourlangsmith_config.yaml, along with the sandbox secret values described in the Prerequisites. Replace placeholders with your deployment-specific values.
These values target chart 0.17. On chart 0.16, sandboxes mount JuiceFS through a bundled JuiceFS CSI driver, so the values differ:
- Set the workload identity annotation on
sandboxes.juicefs.csi.node.serviceAccount.annotationsinstead ofsandboxes.sandboxHost.serviceAccount.annotations. - Set an existing config Secret with
sandboxes.juicefs.csi.existingSecretNameinstead ofsandboxes.juicefs.existingSecretName. - Omit
juicefsFormatJob. Chart 0.16 does not support Azure Blob Storage for sandboxes.
sandboxes.juicefs.csi block from your values. For the steps, see Upgrade an installation.- AWS
- GCP
- Azure
Enable with Terraform
The LangSmith Terraform modules can provision the required AWS and GCP infrastructure and generate the corresponding Helm values.
- AWS
- GCP
In AWS Sandboxes require When
modules/aws/infra/terraform.tfvars, enable Sandboxes and configure the sandbox node capacity:redis_source = "external". The Terraform module:- Creates a dedicated ElastiCache Redis instance for JuiceFS sandbox metadata.
- Configures that dedicated instance with the recommended
noevictionpolicy. - Reuses the LangSmith S3 bucket for sandbox object storage.
- Creates the JuiceFS configuration Secret.
- Adds the expected node label and taint.
modules/aws/app/terraform.tfvars as well:enable_sandboxes = true, the Terraform app module requires an explicit LangSmith Helm chart v17 release and a sandbox runtime image tag.Run the normal AWS flow:Optional: enable service URLs
Setsandboxes.serviceUrlBaseUrl when users need browser or programmatic access to HTTP services running inside Sandboxes.
*.sandbox-services.example.com. When ingress.enabled is true, the chart also adds a wildcard ingress rule that routes these service URLs to the LangSmith platform backend.
Service URLs also require an Ed25519 private JWKS with a nonempty kid on its first key. Set config.signingJwks, or add langsmith_signing_jwks to your existing LangSmith app Secret. This is separate from sandboxes.callbackSigningJwk. For key generation instructions, see Configure a signing JWKS.
Service URLs are required to build and edit custom apps with chat, even though they are optional for other sandbox workflows.
Optional: route egress through a forward proxy
Setsandboxes.authProxy.httpProxy when Sandboxes must reach the internet through a corporate HTTP or HTTPS forward proxy.
Verify the installation
After the upgrade completes, verify that the sandbox runtime pods and JuiceFS volumes are ready:- Create a sandbox from a public image, such as a Python image.
- Start a Python HTTP server inside the sandbox.
- Snapshot the sandbox with memory enabled.
- Create a new sandbox from the snapshot.
- Verify that the HTTP server is still running in the restored sandbox.
Upgrade notes
Sandbox runtime image changes roll out through thesandbox-host Kubernetes Deployment. The chart uses a no-surge rolling update strategy by default, so hosts are replaced one at a time.
During a normal Helm upgrade, a terminating host stops accepting new Sandboxes, attempts to save each running Sandbox’s VM memory to JuiceFS, and then stops those VMs before the pod exits. This shutdown is bounded by the sandbox-host pod termination grace period, which defaults to 300 seconds. This is not live migration: Sandboxes on that host are interrupted during the restart.
Sandboxes are not proactively restarted. They start again when a user or API action starts the Sandbox, or when a request path wakes it. LangSmith then places the Sandbox on an available host and restores from the saved memory image if the shutdown capture completed. If the memory image is absent or incomplete, the Sandbox starts from the saved root filesystem.
Connect these docs to your agent of choice via MCP for real-time answers.

