Agent Sandbox

More Examples

This page provides a collection of official guides and code examples for integrating the agent sandbox into your projects.

Agent Sandbox RL

Generic, multi-cluster batch orchestration for running SWE-bench-style RL and evaluation workloads on Agent Sandbox.

AI Analytics with agent-sandbox

This guide describes how to build Docker image that defines analytics tool for an ADK agent, push the Docker image to a Artifact Registry repository and deploy the pushed image.

Aider in Agent Sandbox

This guide documents the complete setup and deployment of Aider inside an Agent Sandbox with any public GH repository.

All-in-One (AIO) Sandbox Example

This guide demonstrates how to create and access an All-in-One (AIO) Sandbox via Agent-Sandbox, featuring multiple pre-installed tools including VNC, VSCode, Jupyter, and Terminal in one unified environment.

APF Insulation for the Agent Sandbox Controller

An opt-in API Priority and Fairness overlay that gives the agent-sandbox controller dedicated apiserver concurrency, insulating high-rate SandboxClaim workloads from other apiserver load.

Chrome in a Sandbox

This example runs Chrome in an isolated environment using Kubernetes-managed Sandboxes.

Per-Identity Egress Allowlisting with Cilium FQDN Policy

A self-contained example demonstrating on GKE that a network policy bound to a workload identity controls which external domains a sandbox can reach.

Coding Agent on Agent-Sandbox and LangGraph

This guide documents the complete setup and deployment of a coding agent that runs locally on Kubernetes using Kind (Kubernetes in Docker) with the agent-sandbox controller. The agent uses locally-cached transformer models to generate and execute Python code with automatic error correction.

Composing Sandbox with Network Policies

This example demonstrates how to compose a Sandbox with NetworkPolicy, Ingress and Service using KRO (Kubernetes Resource Orchestrator).

Composing Sandbox with Network Policies

This guide documents the complete setup Sandbox with Network Policies that runs locally on Kubernetes using Kind (Kubernetes in Docker) with the agent-sandbox controller.

Containarium SSH Sandbox Example

Demonstrates an SSH-reachable, MCP-native access pattern for the Sandbox CRD where the agent holds only an SSH key and every SSH session is pinned by a forced command.

Envd Sandbox

This example demonstrates running E2B’s envd daemon as the container entrypoint inside an agent-sandbox, providing an E2B-compatible REST and gRPC API for filesystem operations, process execution, and metrics.

Firecracker Sandbox

This example demonstrates how to run an Agent Sandbox on top of Kata Containers with the Firecracker VMM, providing microVM isolation with fast boot times.

Python Runtime Sandbox for Gemini Computer Use Agent

This example implements a Python server in a sandbox container that can run the computer-use-preview agent.

High-Density Agent Sandbox on GKE with Local SSD Swap

Demonstrates how to configure GKE Memory Swap using dedicated Local SSDs to drastically increase the density of agent-sandbox workloads on a single node.

Dynamic Storage Late-Binding for GKE Sandbox Warm Pools

Demonstrates dynamic storage late-binding for GKE Sandbox warm pools, covering private isolated workspaces, shared read-only datasets, and writable scratch storage.

gVisor

This guide shows how to run Agent Sandbox with the gVisor runtime using kind as a cluster.

Hello World on Kubernetes Sandbox

A simple Hello World sandbox example that demonstrates building a Docker image, pushing to Artifact Registry, and deploying to Kubernetes.

Hermes Agent in Kubernetes Sandbox Example

A complete, informational example of how to run Hermes Agent inside a Kubernetes cluster using the Sandbox CRD from agent-sandbox.

Hermes Agents as a Service

The multi-user platform pattern distilled from a real agents-as-a-service product: per-user claims over a warm pool, suspend/resume as the cost dial, PVC state survival, and injection-policy enforcement.

SandboxWarmPool Scaling with HPA (GKE Specific)

Demonstrates how to use the Kubernetes Horizontal Pod Autoscaler (HPA) to scale a SandboxWarmPool based on custom metrics emitted by the agent sandbox controller.

Simulating AWS IRSA Locally with LocalStack

Shows how to validate an AWS IRSA credential-loading code path against a sandbox pod entirely on a local or non-EKS cluster — no real AWS account required.

Isolated ML Workspaces with Agent-Sandbox

Isolated ML Workspaces with Agent-Sandbox

JupyterLab on Agent-Sandbox

Deploy single-user JupyterLab environments using Kubernetes agent-sandbox.

Enabling Kata Containers on AKS

This example demonstrates how to run sandboxed agents with Kata Containers providing hardware-virtualized isolation on AKS, using the built-in Pod Sandboxing feature.

Enabling Kata Containers on GKE

This example demonstrates how to run sandboxed agents with Kata Containers providing hardware-virtualized isolation on GKE.

Kata Containers

This guide shows how to run Agent Sandbox with the Kata Containers runtime using minikube as a cluster.

Kata-Isolated Per-Owner Agent Warm Pool on AKS

Shows how to combine the agent-sandbox extension CRDs with the AKS Pod Sandboxing feature (Kata Containers on Microsoft Hyper-V) to run a fleet of owner-aware AI agents on Azure Kubernetes Service.

SandboxWarmPool Scale-to-Zero with KEDA on GKE

Uses KEDA to scale a SandboxWarmPool down to zero (and back up) based on the rate of sandbox claims, using the KEDA Prometheus scaler against GKE Managed Service for Prometheus.

Using Kueue with Agent Sandbox

Shows how to use Kueue to control the admission of Agent Sandbox workloads and defines a default ResourceFlavor required by the ClusterQueue.

Manual PodDisruptionBudget (PDB) Configuration

This guide demonstrates how to protect Sandboxes from voluntary disruptions (e.g., node drains, cluster upgrades) using standard Kubernetes PodDisruptionBudget manifests, without relying on the controller’s automated disruption control.

MCP Sandbox

A self-contained example of running a Model Context Protocol (MCP) server inside an Agent Sandbox using nothing but kubectl.

nono with Kubernetes Agent Sandbox

Runs nono inside a Kubernetes Sandbox, demonstrating defense in depth for an AI agent with layered isolation and tool execution.

Nullclaw Sandbox Example

This example demonstrates how to run Nullclaw, a minimal AI assistant runtime built with Zig, inside the Agent Sandbox.

Protecting Agentic Sandboxes with OPA Gatekeeper

This guide provides step-by-step instructions for configuring OPA Gatekeeper security policy to prevent granting permissions to ServiceAccounts used by Sandboxes.

OpenClaw on Kata Containers (AKS)

This example runs the OpenClaw agent gateway in an Agent Sandbox isolated by Kata Containers on AKS, giving the agent runtime its own VM and guest kernel.

OpenClaw Sandbox Example

This example demonstrates how to run OpenClaw inside the Agent Sandbox with gVisor isolation and persistent storage.

Pi Code Agent Sandbox Example

This example demonstrates how to run Pi, a terminal-based coding agent from Earendil Works, inside the Agent Sandbox using Pi’s Plain Docker containerization pattern.

Playwright Sandbox Example

This example demonstrates how to run Playwright with Chromium inside an isolated sandbox for web scraping and screenshots.

Python Runtime Sandbox

This example implements a Python FastAPI server in a sandbox container that can execute commands.

Agentic Reinforcement Learning with Ray and Agent Sandbox

Demonstrates how to integrate the Ray framework with agent-sandbox to securely execute AI-generated code during Agentic Reinforcement Learning training.

Secure Agent Sandbox Quickstart

A comprehensive guide to setting up Agent Sandbox from scratch, with optional gVisor or Kata Containers runtime isolation for stronger security.

Sandbox with Kubernetes Service Account

Examples of a sandbox with a service account, namespace, and a basic sandbox configuration.

Sandboxed Tools Example (Go)

Demonstrates an architectural pattern for AI agents: launching an Agent Sandbox for tool execution, keeping the agentic loop outside, and reusing a sandbox across multiple tool calls.

Using Agent Sandbox as a Tool in Agent Development Kit (ADK)

This guide walks you through the process of creating a simple ADK agent that uses Agent Sandbox as a tool to execute Python code in a secure sandboxed environment.

Secure Sandbox Admission Policy (VAP)

This policy enforces secure-by-default posture for all sandbox workloads using Kubernetes Validating Admission Policy.

VSCode Sandbox

This example demonstrates running VSCode in Agent Sandbox with optional hardening using gVisor or Kata Containers.

Warm Pool Quickstart

Reference YAML for the three extension CRDs that power the warm-pool workflow: SandboxTemplate, SandboxWarmPool, and SandboxClaim.

Windows Sandbox Example

This example demonstrates how to run a Windows guest inside the Agent Sandbox via KVM/QEMU using the dockurr/windows container image.

Last modified April 23, 2026: Docs feature use cases (#652) (0840ee5)