Agent Sandbox

Examples

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

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.

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.

Chrome in a Sandbox

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

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.

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.

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.

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 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.

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.

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 Sandbox Example

This example demonstrates how to run OpenClaw (formerly Moltbot) inside the Agent Sandbox.

Python Runtime Sandbox

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

Sandbox with Kubernetes Service Account

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

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.