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.

FastMCP: The Pythonic Framework for Model Context Protocol Applications
August 11, 2026
FastMCP is a robust, Pythonic framework developed by PrefectHQ, designed to simplify the creation of Model Context Protocol (MCP) servers and clients. It provides a comprehensive application framework for connecting Large Language Models (LLMs) to tools and data, handling complexities like schema generation, validation, and protocol lifecycle. As the standard framework for MCP, FastMCP empowers developers to build powerful LLM-integrated applications efficiently.

LobeHub: Your Chief Agent Operator for AI Team Orchestration
August 8, 2026
LobeHub acts as a Chief Agent Operator, streamlining the management of your AI team. It enables hiring, scheduling, and reporting on agents for 24/7 operations, allowing users to maintain control without constant online presence. This platform transforms individual AI tools into a cohesive, productive team.
awesome-ai: A Curated List of 400+ AI APIs, Tools, and Frameworks
August 7, 2026
The awesome-ai repository by edwardtay offers a comprehensive, curated list of over 400 AI APIs, tools, frameworks, and platforms. Spanning more than 40 categories, it serves as an invaluable resource for developers and researchers navigating the vast landscape of artificial intelligence. This list helps users discover solutions for LLMs, agents, image/video generation, MLOps, and more.

ext-apps: Standard for UIs Embedded in AI Chatbots with MCP Protocol
August 6, 2026
MCP Apps provides a standardized way to deliver interactive UIs from MCP servers, rendering inline in compliant chat clients like Claude and ChatGPT. This repository contains the official specification and SDK for building these interactive UIs. It enables developers to create rich user experiences, such as charts, forms, and dashboards, directly within AI chatbot conversations.
Source repository
Open the original repository on GitHub.