Agent-readable wiki
Agent Sandbox Developer Reference Wiki
A developer reference for kubernetes-sigs/agent-sandbox: a Kubernetes controller and SDK ecosystem that delivers a Sandbox CRD plus extensions (SandboxClaim, SandboxTemplate, SandboxWarmPool) for managing isolated, stateful, singleton workloads such as AI agent runtimes.
Pages
- Technical OrientationPurpose of agent-sandbox, its core/extensions split, controller-manager entry point, and a map for navigating the rest of this developer reference.
- Installation & Deployment ModesInstalling the controller via released YAML, Helm chart, or kind clusters; choosing between core-only and core+extensions deployments.
- Quickstart Paths (gVisor, Kata, Vanilla)Walkthrough of the quickstart manifests for vanilla, gVisor, and Kata runtimes, plus how the examples directory organizes runnable scenarios.
- Controller Configuration & Tuning FlagsAll command-line flags exposed by the controller binary: QPS/burst, worker concurrency, warm-pool batch size, leader election, pprof, tracing, and cluster domain.
- Sandbox CRD (agents.x-k8s.io/v1beta1)Field-by-field reference for the core Sandbox resource: PodTemplate, VolumeClaimTemplates, Lifecycle, Replicas (0/1), and Service toggle.
- SandboxTemplate CRDReusable template type used by SandboxClaim and SandboxWarmPool, including the embedded Sandbox spec it encapsulates.
- SandboxClaim CRDClaim resource that resolves to a Sandbox: template references, warm-pool policy, env injection, additional pod metadata, and shutdown policies (Delete, DeleteForeground, Retain).
- SandboxWarmPool CRDSpecification of pre-warmed sandbox pools: template binding, replica counts, and adoption semantics consumed by SandboxClaim.
- Conditions, Reasons & Status SurfacesCatalogue of condition types (Ready, Suspended, Finished), reason strings, and the annotation/label keys (pod-name, template-ref, propagated-labels) that controllers use to coordinate state.
- Controller Manager Entry PointHow cmd/agent-sandbox-controller/main.go wires schemes, the controller-runtime Manager, metrics/pprof servers, leader election, and the optional extensions reconciler set.
- Sandbox ReconcilerReconciliation loop for the core Sandbox: pod/PVC/service materialization, identity propagation, status conditions, scale subresource, and the cluster-domain FQDN logic.
- SandboxClaim ReconcilerThe largest controller in the project: template resolution, env/metadata injection, warm-pool adoption, pod-exclusivity invariants, foreground deletion, and TTL after finish.
- SandboxTemplate ReconcilerValidation and bookkeeping done by the template controller, including how template changes ripple to claims and warm pools.
- SandboxWarmPool ReconcilerPool maintenance loop: parallel batch creation/deletion bounded by max-batch-size, rollout on template changes, and watcher coordination with SandboxClaim.
- Warm Sandbox QueueThe in-memory queue shared between the warm-pool and claim reconcilers that hands off warm sandboxes to incoming claims.
- Lifecycle & Expiry LogicShared expiry helpers used by Sandbox and SandboxClaim controllers to compute shutdown times, requeue durations, and policy-driven cleanup.
- Metrics & Sandbox CollectorReconciler latency/result metrics plus the custom Prometheus collector that surfaces per-sandbox phase, age, and warm-pool stats.
- OpenTelemetry Tracing SetupProvider-neutral OTLP tracing wiring used by both the controller binary and the SDKs; instrumenter interface and no-op fallback.
- Go High-Level SDK (clients/go/sandbox)The high-level Go client: Sandbox lifecycle, command execution, file transfer, port tunnels, gateway, connector strategies, and tracing helpers.
- Generated Go Clientsets, Informers & ListersThe k8s.io/client-go-style generated machinery for Sandbox and extensions: typed clientsets, informers, listers, and the codegen wiring.
- Python Sync SDK CoreSynchronous Python client surface: SandboxClient, Sandbox, connector, command executor, filesystem helpers, and the k8s helper layer.
- Python Async SDKThe asyncio mirror of the sync SDK: AsyncSandboxClient, AsyncSandbox, async connector, async filesystem, and async command executor.
- Python Extensions, Gateway & Sandbox RouterOptional Python add-ons: computer-use extension, GKE pod-snapshot extensions, the sandbox-router service, and the kind-based gateway harness.
- Helm Chart LayoutStructure of the Helm chart: CRD shipping, deployment template, controller-args helper, RBAC bindings, and values knobs that map to controller flags.
- Static Manifests & Generated RBACThe kubectl-apply-ready manifests in k8s/ plus the generated ClusterRole/Binding files used by both core and extensions controllers.
- Examples Library MapTour of the examples/ tree: AIO sandbox, Chrome/VSCode/JupyterLab, agent frameworks (Hermes, LangChain, ADK, Ray, Kueue), policy and scaling scenarios.
- Build, Codegen & Repository ToolsMake targets, the codegen.go shim, deepcopy/CRD generation, lint configuration, and the dev/tools scripts that power local development.
- E2E Test FrameworkLayout of the Go e2e suite, the framework client/predicates/watchset helpers, and the parallel/replica/shutdown scenario coverage.
- Load Testing & CI Pipelinescluster-loader-based load-test recipes plus the prowjob presubmit/periodic configuration that runs them in CI.
- KEPs & RoadmapIn-flight design proposals tracked under docs/keps (suspended state, metadata propagation, Python SDK refactor) and the published roadmap.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.