agent-sandbox
Python SDK for the All-in-One Sandbox API, >=1.7.0
What it is and what it does
Agent Sandbox is a Python SDK that wraps an All-in-One Sandbox API, giving you programmatic access to isolated execution environments for shell commands, file operations, Jupyter notebooks, Node.js scripts, and Model Context Protocol (MCP) interactions. It's designed for agent systems and automation workflows that need to safely execute untrusted or exploratory code in a sandboxed context.
The SDK provides both synchronous and asynchronous interfaces. You connect to a sandbox instance (either locally at http://localhost:8091 or via a cloud provider like Volcengine), then call methods on the client to execute commands, read/write files, run Python in Jupyter kernels, or execute JavaScript. It depends on httpx for HTTP, pydantic for data validation, and volcengine-python-sdk for cloud provider integration.
Use it for:
- Execute shell commands safely in an isolated environment without exposing your host system
- Run untrusted Python code in a Jupyter kernel and capture the output
- Execute JavaScript code in a sandboxed Node.js environment from a Python agent
- Manage files within a sandbox—read, write, and search without direct filesystem access
- Build agent workflows that need to interact with MCP servers in a controlled manner
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python SDK for accessing sandbox, shell, file, Jupyter, Node.js, and MCP services through an All-in-One Sandbox API, with both sync and async support.
Yes, if you need programmatic access to sandboxed execution environments for agent systems or automation. The package is actively maintained, has low install friction, and covers a broad set of execution contexts (shell, Python, Node.js, MCP). Verify whether your use case requires a local sandbox instance or cloud setup, and confirm MCP server availability if you plan to use that feature.
Install
agent-sandbox on PyPI
pip
pip install agent-sandboxuv
uv add agent-sandboxpoetry
poetry add agent-sandboxInstalling agent-sandbox
Before you install
Low friction install with a pure-Python wheel. Actively maintained as of March 2026. Depends on httpx, pydantic, typing_extensions, and volcengine-python-sdk—all standard, well-maintained packages.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install agent-sandbox
from agent_sandbox import Sandbox
client = Sandbox(base_url="http://localhost:8091")
result = client.shell.exec_command(command="ls -la")
print(result)
Requires a running sandbox server at the specified base_url (e.g., http://localhost:8091 for local development, or Volcengine credentials for cloud deployment).
Verify before relying
- Whether the Volcengine provider requires cloud credentials to be useful, or if local sandbox mode works standalone
- Performance characteristics and latency for remote sandbox operations
- Whether MCP service integration requires external MCP servers to be running
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — httpx, pydantic, typing_extensions, volcengine-python-sdk |
| Maintenance | actively maintained — 143 days since the last release |
| First released | |
| Downloads | 124,669/month — #11,859 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: agent_sandbox-0.0.30-py2.py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
jupyter-mcp-serverAn MCP server that exposes Jupyter notebooks…
permissive · top 15,000 on PyPI
k8s-agent-sandboxA Python client library for creating and…
permissive · top 15,000 on PyPI
agent-governance-toolkit-cliProvides CLI tools, SRE observability, and…
permissive · top 15,000 on PyPI
prime-sandboxesPython SDK for creating, managing, and…
permissive · top 15,000 on PyPI
jupyter-aiJupyter AI is a JupyterLab extension that…
permissive · top 15,000 on PyPI
jupyter-mcp-toolsExposes JupyterLab commands as MCP (Model…
permissive · top 15,000 on PyPI
opensandboxOpenSandbox SDK provides low-level Python…
permissive · top 15,000 on PyPI
miniopy-asyncAsynchronous Python client for MinIO object…
permissive · top 15,000 on PyPI
agent-framework-hyperlightIntegrates sandboxed code execution into…
permissive · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI