OpenSandbox: A Secure and Extensible Sandbox Runtime for AI Agents
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
OpenSandbox is a powerful, general-purpose sandbox platform designed for AI applications. It provides secure, fast, and extensible runtime environments, supporting multi-language SDKs and Docker/Kubernetes deployments. This project is ideal for developing and evaluating AI agents in isolated, controlled settings.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
OpenSandbox is a robust, general-purpose sandbox platform tailored for AI applications, offering secure, fast, and extensible runtime environments. It provides multi-language SDKs, unified sandbox APIs, and Docker/Kubernetes runtimes, making it suitable for diverse scenarios such as Coding Agents, GUI Agents, Agent Evaluation, AI Code Execution, and Reinforcement Learning (RL) Training.
Key features include strong isolation, comprehensive network policies, and a secure credential vault, ensuring a robust and protected environment for your AI workloads. Built with scalability in mind, OpenSandbox supports both local development and large-scale distributed scheduling.
Installation
Getting started with OpenSandbox involves installing its SDKs, CLI, and setting up the server.
Python SDK:
pip install opensandbox
OpenSandbox CLI:
pip install opensandbox-cli
Install and Configure the Sandbox Server:
uvx opensandbox-server init-config ~/.sandbox.toml --example docker
uvx opensandbox-server
Examples
OpenSandbox provides a rich set of examples to help you get started, covering SDK usage, agent integrations, browser automation, and training workloads. Here's a quick look at using the Code Interpreter SDK:
Code Interpreter Example (Python):
import asyncio
from datetime import timedelta
from code_interpreter import CodeInterpreter, SupportedLanguage
from opensandbox import Sandbox
from opensandbox.models import WriteEntry
async def main() -> None:
# 1. Create a sandbox
sandbox = await Sandbox.create(
"opensandbox/code-interpreter:v1.1.0",
entrypoint=["/opt/code-interpreter/code-interpreter.sh"],
env={"PYTHON_VERSION": "3.11"},
timeout=timedelta(minutes=10),
)
async with sandbox:
# 2. Execute a shell command
execution = await sandbox.commands.run("echo 'Hello OpenSandbox!'")
print(execution.logs.stdout[0].text)
# 3. Write a file
await sandbox.files.write_files([
WriteEntry(path="/tmp/hello.txt", data="Hello World", mode=644)
])
# 4. Read a file
content = await sandbox.files.read_file("/tmp/hello.txt")
print(f"Content: {content}") # Content: Hello World
# 5. Create a code interpreter
interpreter = await CodeInterpreter.create(sandbox)
# 6. Execute Python code (single-run, pass language directly)
result = await interpreter.codes.run(
"""
import sys
print(sys.version)
result = 2 + 2
result
""",
language=SupportedLanguage.PYTHON,
)
print(result.result[0].text) # 4
print(result.logs.stdout[0].text) # 3.11.14
# 7. Cleanup the sandbox
await sandbox.kill()
if __name__ == "__main__":
asyncio.run(main())
OpenSandbox also provides examples for browser automation (e.g., Chrome, Playwright), desktop environments (VNC, VS Code), and various coding agent integrations. You can explore these and more in the project's examples/ directory.
Why Use OpenSandbox?
- Enhanced Security: OpenSandbox prioritizes security with strong isolation mechanisms, supporting secure container runtimes like gVisor, Kata Containers, and Firecracker microVMs. It also includes a Credential Vault for secure secret injection and comprehensive network policies, protecting your workloads from potential threats.
- Flexibility and Scalability: With multi-language SDKs (Python, Java, JavaScript, C#, Go) and robust support for both Docker and Kubernetes runtimes, OpenSandbox is highly flexible. It scales seamlessly from local development to large-scale distributed deployments, making it ideal for diverse AI infrastructure needs.
- AI-Centric Design: Specifically designed for AI applications, OpenSandbox streamlines the development, testing, and evaluation of AI agents. It provides built-in environments for code interpretation, file operations, and command execution, which are essential for modern AI workflows and agent development.
Links
- GitHub Repository: OpenSandbox GitHub
- Official Documentation: OpenSandbox Documentation
- Discord Community: Join OpenSandbox Discord
Related repositories
Similar repositories that may be relevant next.
Memoh: An Open-Source Multi-Agent Platform with Dedicated AI Workspaces
September 26, 2026
Memoh is an innovative open-source multi-agent platform designed to provide each AI agent with its own dedicated cloud computer. This includes a filesystem, desktop, browser, network, and persistent long-term memory, ensuring agents remain online 24/7. Users can integrate their own API keys or host existing AI models, fostering a versatile and always-on environment for AI development and deployment.
Graphon: A Python Graph Execution Engine for Agentic AI Workflows
September 26, 2026
Graphon is an innovative Python-based graph execution engine designed for building agentic AI workflows. It provides a robust framework for orchestrating complex AI tasks, featuring event-driven execution, graph validation, and shared runtime state. This evolving repository already includes a functional engine, built-in nodes, and end-to-end examples for developers.

llm-d Router: Intelligent Orchestration for Multi-Phase LLM Inference
September 25, 2026
The `llm-d-router` is a sophisticated Go service designed as an intelligent entry point for large language model (LLM) inference requests. It orchestrates complex, multi-phase LLM inference pipelines across specialized worker pools, routing requests through an Inference Gateway to disaggregated vLLM workers. By exposing OpenAI-compatible APIs, it simplifies integration and leverages Kubernetes for scalable, efficient deployments.

dcc-mcp-blender: AI-Driven 3D Workflows with an Embedded MCP Server
September 24, 2026
dcc-mcp-blender is a powerful Blender addon that integrates an embedded Streamable HTTP MCP server directly into Blender. This allows any MCP-compatible AI client to seamlessly control and automate your 3D modeling, animation, and rendering workflows. It offers over 200 pre-built tools and an extensible skill system for robust production environments.
Source repository
Open the original repository on GitHub.
30 counted GitHub visits