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.

karpathy-llm-wiki: Build a Karpathy-Style LLM Knowledge Base
September 9, 2026
karpathy-llm-wiki is an Agent Skills-compatible tool that implements Karpathy's LLM Wiki idea, allowing users to build a durable knowledge base. It enables LLMs to maintain structured wiki pages by ingesting sources, compiling knowledge, and answering questions with citations. This project offers a robust alternative to traditional RAG for compounding knowledge over time.
AgenticSchema: Empowering AI Agents with Structured Web Data
September 8, 2026
AgenticSchema is an innovative open-source library that transforms existing Schema.org markup, including JSON-LD, Microdata, and RDFa, into callable tools for AI agents. This library operates entirely client-side, requiring no backend infrastructure, and significantly enhances an agent's ability to interact with web content. By leveraging structured data already present on millions of websites, AgenticSchema bridges the gap between web content and AI agent capabilities.

Context Engineering Kit: Enhance AI Agent Quality with Advanced Skills
September 6, 2026
The Context Engineering Kit is a powerful collection of hand-crafted Claude Code Skills designed to significantly improve the quality and predictability of AI agent results. It offers advanced context engineering techniques with a minimal token footprint, ensuring efficiency and effectiveness across platforms like OpenCode, Cursor, and Gemini CLI. This kit provides granular control over plugins and includes an open-source alternative to CodeRabbit, enhancing development workflows.

opencode-worktree: Zero-Friction Git Worktrees for AI-Driven Development
September 6, 2026
opencode-worktree is an OpenCode plugin designed to streamline git worktree management. It automates the creation and deletion of isolated development environments, complete with terminal spawning and file synchronization. This tool is ideal for AI-driven workflows, offering a zero-friction experience for developers who prioritize automation and efficiency.
Source repository
Open the original repository on GitHub.
25 counted GitHub visits