k8s-agent-sandbox
A client library to interact with the Agentic Sandbox on Kubernetes.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained with no known vulnerabilities, has low install friction, and fills a clear need for Kubernetes-native sandbox management. Install it if you are building agents or orchestration tools on Kubernetes and need reliable, scalable sandbox lifecycle management. The permissive Apache license and recent release cadence make it a safe production dependency.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Kubernetes cluster with the Agent Sandbox Controller installed and a deployed sandbox-router service; kubectl must be configured locally.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
last release 2026-08-13 (1 days) · last repo commit 2026-08-14 · 3,520 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 648,849 downloads/mo, #5,582 on PyPI
Alternatives
Verify before relying
pip install k8s-agent-sandbox
from k8s_agent_sandbox import SandboxClient
from k8s_agent_sandbox.models import SandboxLocalTunnelConnectionConfig
client = SandboxClient(connection_config=SandboxLocalTunnelConnectionConfig())
sandbox = client.create_sandbox(warmpool="python-sandbox-warmpool", namespace="default")
try:
result = sandbox.commands.run("echo 'Hello'")
finally:
sandbox.terminate()- Whether optional tracing dependencies (GCP OpenTelemetry integration) are production-ready or experimental.
- Performance characteristics and latency overhead of the four connection modes under load.
- Whether the async client API is feature-complete relative to the synchronous client.
What it is and what it does
k8s-agent-sandbox is a Python client for the Kubernetes Agent Sandbox Controller, enabling you to programmatically create, configure, and tear down isolated sandbox environments running inside a Kubernetes cluster. It abstracts away the complexity of pod lifecycle management and networking by providing a high-level interface that works as a context manager, ensuring proper resource cleanup.
The client supports four connection modes: Gateway Mode for production cloud deployments with load balancing, Tunnel Mode for local development via kubectl port-forward, In-Cluster Mode for workloads running inside the cluster that connect directly to sandbox pods, and Advanced Mode for custom networking scenarios. It depends on kubernetes, requests, pydantic, and prometheus-client, and includes optional async support for integration with async frameworks like FastAPI.
Use it for
- Local development and testing of agent code against isolated sandbox environments without needing a public cloud deployment.
- Production agent orchestration on GKE or other managed Kubernetes services using the Gateway Mode for high-scale, load-balanced sandbox provisioning.
- CI/CD pipelines that need to spin up ephemeral, isolated execution environments for testing untrusted or experimental code.
- In-cluster agent workloads that spawn child sandboxes for subtasks, communicating directly via cluster DNS.
- Custom networking scenarios where sandboxes are accessed through a specific domain or manually configured router URL.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained with no known vulnerabilities, has low install friction, and fills a clear need for Kubernetes-native sandbox management. Install it if you are building agents or orchestration tools on Kubernetes and need reliable, scalable sandbox lifecycle management. The permissive Apache license and recent release cadence make it a safe production dependency.
Install
k8s-agent-sandbox on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Runtime dependencies are standard and widely available (kubernetes, requests, pydantic, prometheus-client).
Requires a running Kubernetes cluster with the Agent Sandbox Controller installed and a deployed sandbox-router service; kubectl must be configured locally.
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install k8s-agent-sandbox
from k8s_agent_sandbox import SandboxClient
from k8s_agent_sandbox.models import SandboxLocalTunnelConnectionConfig
client = SandboxClient(connection_config=SandboxLocalTunnelConnectionConfig())
sandbox = client.create_sandbox(warmpool="python-sandbox-warmpool", namespace="default")
try:
result = sandbox.commands.run("echo 'Hello'")
finally:
sandbox.terminate()
Verify before relying
- Whether optional tracing dependencies (GCP OpenTelemetry integration) are production-ready or experimental.
- Performance characteristics and latency overhead of the four connection modes under load.
- Whether the async client API is feature-complete relative to the synchronous client.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packageskubernetesrequestspydanticprometheus-client |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 648,849 / month, #5,582 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: k8s_agent_sandbox-0.5.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “kubernetes sandbox client”
- k8s-agent-sandboxA Python client library for creating and managing isolated sandbox…
- cwsandboxA Python client library for running and managing isolated container…
- llm-sandboxExecutes code generated by large language models in isolated…
Give your agent the search over MCP, or paste the wish link into any chat.
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework that enables you to define and call remote procedures across network boundaries using protocol buffers for serialization.
Install it if you need RPC communication in a distributed system or are integrating with existing gRPC services.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
Cloudpickle extends Python's standard pickle module to serialize lambda functions, interactively-defined functions and classes, and other constructs that the default pickle cannot handle, making it suitable for cluster computing and remote code execution.
Install it if you need to serialize lambda functions, interactively-defined code, or non-standard Python constructs for cluster computing or distributed execution.
Provides a unified, open()-compatible Python API for streaming large files from remote storage (S3, GCS, Azure, HDFS, SFTP, HTTP) and local filesystems, with transparent compression support.
Install it if you work with large files on cloud storage or remote systems and want to avoid writing boilerplate around multiple SDKs.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
Ray is a distributed computing framework that scales Python applications from a single machine to multi-node clusters, providing abstractions for parallel tasks, stateful actors, and shared objects.
See also kr8s · opensandbox · agent-sandbox · prime-sandboxes · cwsandbox · portforward · openshift · koyeb-sdk · anyscale · blaxel