Give your agent a
disposable Linux sandbox
Install dependencies, run commands, read and write files and execute code in isolation, never on your own machine. One CLI, SDKs and MCP; Alibaba Cloud Express by default, or your own backend.
# install and configure npm install -g @agent-sandbox/cli export ABX_SANDBOX_API_KEY="<YOUR_API_KEY>" # create, run, destroy abx create --template base abx exec <sandbox-id> -- python3 -c "print(2 ** 10)" 1024 abx kill <sandbox-id> --yes
Everything a sandbox should do
The 18 capabilities map to calls that really exist in the SDK. A provider that does not declare one fails clearly before any request is sent, never silently.
Lifecycle
Create, connect, list and kill. Change the lifetime, pause and resume.
Run commands
Synchronous or streamed output, background processes, signals and process lists, an interactive terminal.
Files
Read, write, directories and rename. Watch a directory. Upload and download URLs.
Code interpreter
Run Python and more inside the sandbox and get structured results back.
Ports and network
A URL for every service in the sandbox. Optional custom domains, storage mounts and VPC.
Templates
Describe the environment with template.yaml and a Dockerfile. Build, publish and install are one command each.
Named commands
Register a function with @command in the template and call sandbox.run("name") as if it were local.
A template says what is inside; a provider decides where it runs
Callers see one interface. Change the backend without touching your code; change the template without touching the backend.
Only alicloud-express ships with the CLI and the SDK. Every other provider is opt-in: download it from the Registry. Install copies files and never runs plugin code.
Start from a terminal, code or an agent
Install and configure
The CLI is an npm package. Put the API key in the environment, or store it with abx config set.
Create, run, destroy
base is the default template on Express. Destroy when done so it stops using quota.
Switch backend
Install a provider, then pass provider when you create.
npm install -g @agent-sandbox/cli
export ABX_SANDBOX_API_KEY="<YOUR_API_KEY>"
abx create --template base
abx exec <sandbox-id> -- echo hello
abx kill <sandbox-id> --yesimport asyncio
from agent_sandbox import Sandbox
async def main():
async with await Sandbox.create(template="base") as sandbox:
result = await sandbox.commands.run("echo hello")
print(result.stdout)
asyncio.run(main())# python -m agent_sandbox.providers install registry:opensandbox --yes
await Sandbox.create(provider="opensandbox", template="base")npm install -g @agent-sandbox/cli
export ABX_SANDBOX_API_KEY="<YOUR_API_KEY>"
abx mcp install --target cursor # or claude, vscode
abx mcp start # STDIO server for other clientsOne by default, more when you need them
This data comes from the Registry and matches its providers/index.json. Every provider has a capability matrix, its configuration and a command to copy.
Alibaba Cloud Agent Sandbox Express Edition
Default provider of the CLI and the Python SDK. abx template deploy builds and registers templates here.
OpenSandbox
Run sandboxes on an OpenSandbox server (Docker or Kubernetes). Commands, files and a terminal work over the OpenSandbox HTTP API.
Alibaba Cloud Agent Sandbox Container Edition
Run sandboxes on the sandbox-manager of Alibaba Cloud ACS or ACK, the container edition.
CubeSandbox
Run sandboxes on a CubeSandbox CubeAPI. Supports the Jupyter code interpreter on port 49999.
E2B
Run sandboxes on E2B cloud. The API key is ABX_E2B_API_KEY. It does not read the Express key or E2B_API_KEY.
Environments that just run
Browser automation, coding-agent runtimes, Node services. One abx template install builds and registers it.
Coding agents
Runtimes for CLI coding agents such as Claude Code, Codex, Qwen Code and Gemini.
claude-codecodexqoder+7Agent services and gateways
Self-hosted agent APIs, gateways and tool-calling harnesses that other programs talk to.
codex-agent-apiagents-clihermes-agent+1Browser and automation
Headless Chromium with Playwright for scraping, testing and browsing agents.
browser-automationLanguage runtimes and web services
Plain Python and Node.js environments, and a ready web-service runtime.
python-hellonode-webN repositories, one whole
agent-sandbox
@agent-sandbox/cliThe abx CLI, the MCP server, the Agent Skill, and template build and deploy.
python-sdk
agent-sandbox · agent-sandbox-serverThe async client and the HTTP service inside the sandbox image.
nodejs-sdk
@agent-sandbox/sdkAn ESM client for Node.js 20+. The first slice is implemented.
awesome-templates
templatesThe public catalog of sandbox templates.
awesome-providers
providersThe installable provider catalog, with authoring and publishing docs.
registry
registry.agent-sandbox.cnTurns the repositories above into a browsable, searchable catalog.
Cases, tutorials and release notes
See how others use it, follow along, or send us your own case.
Let a coding agent run its own code in a disposable sandbox
An agent writes a script and wants to run it, but you do not want it near your machine. A small example walks through create, upload, run, fetch and destroy, once with the CLI and once with Python.
The website and the Registry relaunch with one design and a blog
The website and the Registry now share one design system, both come in English and Chinese, and their content comes from real repository data. The website also gains this blog for cases, tutorials and release notes.
Publish your template to the Registry: from directory to merge
A template is a directory plus one index entry. This post goes through what to create, how to verify it locally, what to check before opening the pull request, and when it shows up in the Registry.
Conservative by default, because the code is untrusted
One built-in provider
The CLI and SDK ship only alicloud-express. Any other backend is something you choose to install.
Install only copies files
Provider packages carry a sha256 that is checked before anything lands on disk. Install never runs the plugin.
Keys are not shared
Each provider reads only its own environment variables and never receives the Express key.
Disposable by design
async with destroys the sandbox on exit, leaving no dependencies or processes on your machine.
Open a sandbox now
Two minutes: install the CLI, set a key, run abx create. To bring your own backend, publish a provider to the Registry.