🚀 Announcing Agent Sandbox v0.5.0rc1!
We're excited to announce the release candidate of Agent Sandbox v0.5.0! This pre-release introduces major API advancements with the v1beta1 upgrade, enhanced warm pool management, critical security hardenings, and expanded developer tooling.
⚠️ Pre-Release Notice
This is a Release Candidate (RC) intended for early testing, validation, and feedback by maintainers and early adopters. It is not recommended for production environments.
Warning
Migrating existing v1alpha1 API objects to v1beta1 is not yet supported (coming soon); users must install this version in a clean environment (no pre-existing v1alpha1 CRDs or CRs).
⚠️ Breaking Changes / Action Required
- API Group Upgrade (
v1beta1) (#867): The core and extension APIs have been upgraded fromv1alpha1tov1beta1. All example manifests and documentation now reflectv1beta1. SandboxClaimSpecification Overhaul (#899): Thespec.templateReffield inSandboxClaimhas been replaced withspec.warmpoolRefto better reflect warm pool architectural integration.- System-Reserved Metadata Protection (#894): System-reserved Pod labels and annotations are now protected from tenant overrides to prevent privilege escalation and sandbox hijacking.
Key Highlights
-
API Evolution & Stability
- API Graduation to v1beta1: The core Agent Sandbox API has been graduated from
v1alpha1tov1beta1, marking a significant step towards maturity and stability. This involves dropping legacy alpha schemas and updating controllers for parity. - Sandbox Lifecycle Management: Replaced
spec.replicaswith a newspec.operatingModefield (supportingRunningandSuspended) to provide more explicit and granular control over Sandbox suspension and resumption. This is a breaking change. - SandboxClaim API Refinement: The
SandboxClaimAPI now uses aspec.warmPoolRefinstead ofspec.templateRef, simplifying how claims interact with warm pools and enhancing clarity. This is an action-required breaking change. - Granular Sandbox Suspend Condition: Introduced an explicit
Suspendedcondition in the Sandbox status for more accurate tracking of sandbox states, supporting future features like process freezing. - Orphan Adoption Restoration: Fixed a regression preventing the Sandbox controller from re-adopting unowned child resources (Pods, Services, PVCs) after Sandbox recreation, ensuring proper declarative lifecycle management.
- Sandbox Template Ref Hash Propagation: The
sandbox-template-ref-hashlabel is now consistently propagated toSandboxTemplateresources and adopted/cold-path Sandboxes, enabling easier client-side resolution of template-to-sandbox relationships. - Warm Pool Eviction: Implemented warm pool eviction using Cluster Autoscaler annotations, allowing idle, un-adopted Sandboxes to be marked as safe to evict.
- Sandbox Name Annotation: The assigned Sandbox name is now stored in an annotation instead of a label to bypass Kubernetes' 63-character length constraint.
- API Graduation to v1beta1: The core Agent Sandbox API has been graduated from
-
Security Enhancements
- Sandbox Router Hardening: Addressed vulnerabilities related to unauthenticated internal proxying by enforcing strict
sandbox_idvalidation, implementing optional Bearer token authentication, and tightening NetworkPolicy scoping toagent-sandbox-systemnamespace. - Pod Metadata Protection: Prevented tenants from overriding system-reserved Pod labels and annotations (
agents.x-k8s.io/,extensions.agents.x-k8s.io/), mitigating potential traffic hijacking and spoofing. - Resource Hijacking Prevention: Introduced explicit label authorization (
agents.x-k8s.io/adoptable: "true") before adopting unowned Pods, Services, and PVCs, fixing a critical vulnerability. - Python SDK Security: Disabled automatic HTTP redirects in
SandboxConnectorto prevent Server-Side Request Forgery (SSRF) attacks and sanitized OpenTelemetry trace attributes to prevent sensitive data exposure. - CI/Build Security: Fixed a Python module shadowing vulnerability in CI presubmits that could lead to Remote Code Execution (RCE) and added validation for
KATA_VERSIONto prevent path traversal. - IPv6 NetworkPolicy Hardening: The default NetworkPolicy now explicitly blocks IPv6 link-local traffic (
fe80::/10), preventing untrusted code from accessing local services or cloud metadata endpoints. - Resourcectl PID Cleanup: Fixed a logic issue in
resourcectl cleanupthat could lead to arbitrary process termination due to stale heartbeat PIDs. - Analytics Tool Hardening: Patched a security vulnerability in the
examples/analytics-toolallowing bypass of command execution allow-lists.
- Sandbox Router Hardening: Addressed vulnerabilities related to unauthenticated internal proxying by enforcing strict
-
Performance & Scalability
- Parallel Warm Pool Operations: Enabled parallel creation and deletion of sandboxes in the Warm Pool controller, significantly reducing reconciliation times (up to 4.26x faster).
- Warm Pool Selection Optimization: Optimized the NodeSpread sandbox selection strategy to run purely in-memory, drastically reducing API server overhead and improving P99 concurrent claim latency by up to 4x.
- Claim Status Update Optimization: Switched to patching for
SandboxClaimstatus updates to reduce conflicts and improve scalability. - Memory Leak Reduction: Implemented measures to catch memory leaks and reduce per-scrape allocations across controllers and clients.
-
Python & Go SDK Improvements
- Python SDK Client Enhancements: Added support for label selectors, hardened file upload path validation, enabled template-verified reattachment, and introduced
shutdown_after_secondsfor ephemeral sandboxes. - Python SDK Snapshot Restoration: Enabled restoration from dedicated snapshots, allowing sandboxes to be reverted to specific previous states.
- Go SDK PodIP Routing: Implemented
PodIProuting to fix connection issues with local sandbox-router gateways when cluster DNS is not available.
- Python SDK Client Enhancements: Added support for label selectors, hardened file upload path validation, enabled template-verified reattachment, and introduced
-
Enhanced Developer Experience & Tooling
- Standardized GitHub Issue Templates: Added structured YAML templates for bug reports, feature requests, and maintainer epics, along with a
config.ymlfor clearer contact links. - AI Code Review Integration: Configured CodeRabbit for automated PR summaries and walkthroughs, and optimized Copilot instructions to align with project toolchain, linting, and review scope policies.
- Helm Chart Flexibility: Added
podAnnotations,podLabels,podSecurityContext, andcontainerSecurityContextoptions to the controller Helm chart for greater customization and compliance with cluster security policies. - Build System Updates: Bumped Go versions across the repository and updated GitHub Actions dependencies. The PyPI publish process was also updated to allow release candidate versions.
- Standardized GitHub Issue Templates: Added structured YAML templates for bug reports, feature requests, and maintainer epics, along with a
-
Examples & Documentation
- Sandboxed Tools Enhancements: Refactored tools into their own package, added functionality for persisting sessions across invocations, and enabled sandboxes to stay alive over multiple tool calls for faster execution.
- New Example Workloads: Introduced a self-contained example for running an MCP server inside a sandbox with storage persistence, an AKS example using Kata Containers with sandbox warm pools, and a RayJob integration example.
- Comprehensive Documentation Updates: All examples and documentation have been upgraded to reflect the
v1beta1API. New guides include detailed explanations of NetworkPolicy management, NodeLocal DNS with NetworkPolicy, and utilizing Dataplane-v2 for setup.
Installation
Core & Extensions
# To install only the core components:
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v0.5.0rc1/manifest.yaml
# To install the extensions components:
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v0.5.0rc1/extensions.yamlPython SDK
pip install k8s-agent-sandbox==0.5.0rc1Contributors
We extend our sincere thanks to all contributors to this release:
@aditya-shantanu, @AlexBulankou, @armistcxy, @arpitjain099, @chw120, @dependabot[bot], @hrsh1209, @ianchakeres, @janetkuo, @justinsb, @lauragalbraith, @moficodes, @mvanhorn, @patcrombie, @rainwoodman, @rmalani-nv, @ryanzhang-oss, @shaikenov, @shelwinnn, @SHRUTI6991, @shrutiyam-glitch, @tom1299, @tomergee, @vicentefb
👋 New Contributors
- @AlexBulankou made their first contribution in #866
- @armistcxy made their first contribution in #885
- @arpitjain099 made their first contribution in #796
- @hrsh1209 made their first contribution in #753
- @ianchakeres made upwards of their first contribution in #906
- @lauragalbraith made their first contribution in #763
- @mvanhorn made their first contribution in #864
- @patcrombie made their first contribution in #803
- @rainwoodman made their first contribution in #711
- @rmalani-nv made their first contribution in #750
- @ryanzhang-oss made their first contribution in #839
- @shaikenov made their first contribution in #798
- @shelwinnn made their first contribution in #805
- @tom1299 made their first contribution in #845
Full Changelog: v0.4.6...v0.5.0rc1