Agent Sandbox is a secure, isolated execution environment where AI agents run code and processes, operate on files, access the network, and manage state.
Features
Alibaba Cloud Agent Sandbox creates sandboxes on demand to run workloads that agents generate at runtime, such as code, tools, and browsers. It releases the resources when the tasks are complete.
Agent Sandbox is designed for agent tasks, which are untrusted, highly elastic, stateful, and intermittently executed. It provides million-scale concurrency, millisecond-level startup, virtual machine (VM)-level security isolation, and open compatibility to help developers and enterprises quickly build and run agent applications at scale.
Benefits
Million-scale concurrency
Agent Sandbox uses large-scale scheduling and resource provisioning to support millions of sandboxes running concurrently and scale elastically. Whether the workload is burst traffic from online agents or the large-scale parallel execution of reinforcement learning and evaluation tasks, the required computing power is available quickly.
Scheduling optimizations and multi-level image pre-warming effectively reduce the time required to prepare environments, which improves task throughput and the interactive experience.
Millisecond-level startup
Agent Sandbox supports sandbox hibernation, resumption within seconds, and batch cloning. In long-session or intermittent execution scenarios, a sandbox can hibernate while the agent waits for a model response, an external API, or human feedback, which reduces idle computing costs. When the task continues, the execution environment resumes quickly.
Agent Sandbox also supports creating a checkpoint (a snapshot of the sandbox state) while a sandbox is running, and batch-cloning tens of thousands of independent sandboxes from a single checkpoint. This speeds up long-running agent task resumption, reinforcement learning rollouts (trajectory sampling), tree search, and multi-path exploration.
VM-level security isolation
Each sandbox runs in an independent VM environment that isolates compute, network, storage, and permissions across multiple dimensions. This reduces the impact that untrusted code, third-party tools, and automated operations can have on business systems and other tasks.
Agent Sandbox supports multi-level network controls, such as security groups and Layer 4 (L4) and Layer 7 (L7) network policies. Agents can access Alibaba Cloud services, model services, and external APIs through identity and credential management instead of long-term credentials configured directly in the sandbox environment. This reduces security risks and makes agent execution more controllable.
Open compatibility
Agent Sandbox is compatible with E2B, an open-source agent sandbox software development kit (SDK), and provides Kubernetes APIs for quick integration with existing agent frameworks and enterprise infrastructure. Agent Sandbox supports multiple sandbox types, including code, browser, desktop, and mobile. These types cover needs ranging from quick verification by individual developers to large-scale governance of enterprise agent platforms.
Scenarios
Reinforcement learning and evaluation
For massively parallel tasks such as reinforcement learning, evaluation, and environment simulation, Agent Sandbox provides environment pools that scale on demand. The checkpoint and restore features let you quickly save, restore, and batch-clone environments to support parallel rollouts (trajectory sampling), tree search, multi-path exploration, and extreme stress testing.
Agent Serving
Agent Sandbox supports two operating modes for online agents: The agent runs in the sandbox, or the agent calls the sandbox as an external tool execution layer.
Agent in Sandbox
The main agent process and the task environment run together in the sandbox. This mode is suitable for agents that need to stay resident for a long period, execute tasks continuously, and retain state. Hibernation, resume, and checkpoints reduce idle costs while the agent waits for a model response, an external API, or human feedback. The execution environment resumes when the task continues.
Agent Use Sandbox
The agent runs outside the sandbox and uses the sandbox as an isolated execution layer for tools such as code, browsers, desktops, and mobile environments. This mode is suitable for scenarios such as Agent Tools, code interpreters, Browser Use, Computer Use, data processing, and automated testing. On-demand creation and reclamation improve the isolation and elasticity of tool calls.
Sandbox types
Sandbox type | Description | Typical use |
Code sandbox | Provides an execution environment for commands, code, processes, and files. | Coding agents, code interpreters, data analysis, and automated testing. |
Browser sandbox | Provides a headless or graphical user interface (GUI) browser environment. | Browser agents, Deep Research, web automation, and web testing. |
Desktop sandbox | Provides a full desktop GUI operating environment. | Computer Use agents, desktop software automation, and office task execution. |
Mobile sandbox | Provides an environment for operating mobile applications. | Mobile agents, application automation, and compatibility testing. |
The supported sandbox types may vary by region, access method, and product stage. Use the information in the product console and the corresponding help documentation as the authoritative source.
Edition selection and access methods
Access method | Applicable to | Characteristics | Typical needs |
Developer API | Agent developers and application development teams | API-first, ready-to-use, and elastic on demand, without managing the underlying infrastructure. | Quick integration, E2B ecosystem compatibility, online agent services, and tool calls. |
Kubernetes API | AI infrastructure teams and platform engineering teams | Kubernetes-native, with declarative management and deep integration into enterprise infrastructure. | Custom environments, network and storage integration, batch orchestration, and unified permissions and O&M governance. |
Flash Edition
The Flash Edition is designed for model and agent developers, business development teams, and migration from the E2B ecosystem. It provides a fully managed, API-first, ready-to-use experience through the Developer API. The Flash Edition is compatible with the E2B SDK. An existing application can quickly connect through methods such as configuring the service endpoint, without managing the underlying infrastructure.
Container Edition
The Container Edition is designed for platform engineering teams, AI infrastructure teams, and Kubernetes platform-as-a-service (PaaS) scenarios. It provides declarative management through the Kubernetes API and the Sandbox custom resource. The Container Edition is compatible with the E2B protocol, reuses your existing Kubernetes technology stack. It also brings sandboxes into enterprise network, storage, scheduling, permission, monitoring, and O&M governance systems.