Skip to content

agent_sandbox: skeleton resource, spec, and cluster wiring#6730

Open
geojaz wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
onix-net:geojaz/agent-sandbox-skeleton
Open

agent_sandbox: skeleton resource, spec, and cluster wiring#6730
geojaz wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
onix-net:geojaz/agent-sandbox-skeleton

Conversation

@geojaz

@geojaz geojaz commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

What

First step of reshaping the agent sandbox from a linux_package into a proper PKB resource, modeled on the kubernetes inference server pattern. Per review feedback on #6718.

This PR is structure only: no install logic and no benchmark, so the new files can be reviewed (and mirrored internally for build files) before the implementation lands.

Changes

  • BaseAgentSandbox resource and GetAgentSandbox factory, keyed on SANDBOX_TYPE so multiple sandbox implementations can coexist.
  • BaseAgentSandboxConfigSpec and AgentSandboxConfigDecoder, embeddable under container_cluster in a benchmark config.
  • K8sAgentSandbox / K8sAgentSandboxConfigSpec (in k8s_agent_sandbox.py / k8s_agent_sandbox_spec.py): the Kubernetes (kubernetes-sigs/agent-sandbox) implementation stubs, registered under type: Kubernetes. They raise NotImplementedError until the follow-up.
  • KubernetesCluster constructs and lifecycles cluster.agent_sandbox alongside cluster.inference_server. Cloud-agnostic; no GKE/EKS changes.

Notes for reviewers

  • The base classes are deliberately generic (BaseAgentSandbox, BaseAgentSandboxConfigSpec) so non-Kubernetes sandbox implementations can be added later under different SANDBOX_TYPEs. The concrete Kubernetes implementation is K8sAgentSandbox.
  • Unrelated to the existing SandboxSpec (GKE Sandbox / sandboxed node pools). "Agent sandbox" here refers to the kubernetes-sigs/agent-sandbox SandboxClaim workload.

Follow-ups

Subsequent PRs add the install logic (K8sAgentSandbox._Create / _Delete), the benchmark, and the GKE/EKS/AKS provider changes.

Introduce the agent sandbox as a PKB resource modeled on the kubernetes
inference server pattern, replacing the prior linux_package shape. This
change adds only the class/spec/registration skeleton plus the
cloud-agnostic container_cluster wiring. The install logic and the
benchmark are added in follow-up changes.

- BaseAgentSandbox resource and GetAgentSandbox factory, keyed on
  SANDBOX_TYPE so additional sandbox implementations can coexist.
- BaseAgentSandboxConfigSpec and AgentSandboxConfigDecoder, embeddable
  under container_cluster in a benchmark config.
- K8sAgentSandbox / K8sAgentSandboxConfigSpec: the Kubernetes
  (kubernetes-sigs/agent-sandbox) implementation stubs.
- KubernetesCluster constructs and lifecycles cluster.agent_sandbox
  alongside cluster.inference_server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants