Sandbox Runtime

Active
GitHub TypeScript Apache-2.0

Description

An experimental lightweight isolated runtime from Anthropic for executing agent tasks in a sandboxed environment.

Key Features

  • OS-level sandboxing without containers using native primitives (sandbox-exec on macOS, bubblewrap on Linux)
  • Filesystem isolation with deny-then-allow read patterns and allow-only write patterns
  • Network isolation via HTTP and SOCKS5 proxy-based domain filtering with allowlists/denylists
  • Dual isolation model combining filesystem and network restrictions for effective sandboxing
  • CLI tool (srt) and TypeScript library for wrapping any command with security boundaries
  • Sandbox violation monitoring with real-time alerts on macOS

Use Cases

💡 Sandboxing MCP servers to restrict filesystem and network access in AI agent workflows
💡 Securing AI code execution by limiting file reads/writes and outbound network connections
💡 Protecting sensitive files like SSH keys from being accessed by automated processes
💡 Building safe development environments where agents can run commands with guardrails
💡 Enforcing least-privilege access patterns for local AI agent tool execution

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (5.1k stars)
  • Permissive open-source license (Apache-2.0)

Quick Start

Install globally with 'npm install -g @anthropic-ai/sandbox-runtime'. Wrap any command with 'srt <command>' to apply sandbox restrictions. Configure allowed domains and filesystem paths in ~/.srt-settings.json. For MCP servers, add 'srt' as the command prefix in .mcp.json.

Related Projects

CubeSandbox

11.7k · Go
Active A

A high-performance, secure sandbox service for AI agents by Tencent Cloud, built on RustVMM and KVM with hardware-level isolation, sub-60ms cold start, <5MB memory overhead, and E2B SDK compatibility.

sandboxcode-executionrust +2
  • · Blazing-fast cold start: sub-60ms end-to-end sandbox creation via resource pool pre-provisioning and snapshot cloning
  • · Ultra-low memory overhead: less than 5MB per instance, enabling thousands of sandboxes on a single machine
  • · True kernel-level isolation: each agent runs with its own dedicated Guest OS kernel based on RustVMM and KVM

code-sandbox-mcp

327 · Go
Stale C

An MCP server that creates secure Docker-based sandboxes for executing untrusted code from AI applications.

mcpsandboxdocker +1
  • · Docker isolation - Each execution runs in a fresh Docker container isolated from host network and filesystem
  • · MCP-compliant API - Exposes create, execute, and cleanup tools over the Model Context Protocol
  • · Multi-language - Bundles Python, Node, and Bash runtimes that can be invoked inside the sandbox

BoxLite

2.3k · Rust
Active B

Lightweight VM compute substrate for AI agents, running OCI containers inside Boxes, embeddable as a Python library without daemon or root privileges.

microvmocisandbox +2
  • · Stateful workspaces — Boxes retain packages, files, and environment across stop/restart, avoiding rebuilds
  • · Lightweight VMs — Small footprint, fast boot, async-first API for high concurrency
  • · Hardware isolation — Each Box runs its own kernel, not just namespaces or regular containers

Cloudflare Sandbox SDK

1.1k · TypeScript
Active A

A TypeScript SDK for running sandboxed code environments on Cloudflare's edge network, designed for AI agents and untrusted code execution.

sandboxcloudflaretypescript +2
  • · Edge sandboxes - Run lightweight microVM sandboxes on the Cloudflare global network with low cold-start latency
  • · Multi-language execution - Run Python, Node.js, Java, and Bash code in isolated environments
  • · Snapshots and restore - Snapshot sandbox state and resume for long-running agents