ai-sdk-sandbox-runtime has 6,777 recorded weekly downloads on npm, an increase of 8478% over the past 30 days, ranking #1413 of 3,247 tracked listings.
About ai-sdk-sandbox-runtime
ai-sdk-sandbox-runtime
<p align="center"> <a href="https://www.npmjs.com/package/ai-sdk-sandbox-runtime"><img alt="npm" src="https://img.shields.io/npm/v/ai-sdk-sandbox-runtime" /></a> <a href="https://github.com/fpasquet/ai-sdk-harness/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/fpasquet/ai-sdk-harness/actions/workflows/ci.yml/badge.svg" /></a> <img alt="Node >= 24" src="https://img.shields.io/badge/node-%3E%3D24-3c873a" /> <img alt="TypeScript strict" src="https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white" /> <a href="https://github.com/fpasquet/ai-sdk-harness/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg" /></a> </p>Run AI SDK harness agents (Claude Code, Codex, OpenCode…) on your own machine, fenced by the operating system, with no container and no virtual machine: Anthropic Sandbox Runtime (srt), the sandbox Claude Code puts around its own commands, put around the whole agent.
The package gives HarnessAgent.createSession({ sandboxSession }) what it expects, a HarnessV1NetworkSandboxSession, like ai-sdk-sandbox-sbx does for Docker Sandboxes:
- Fenced by the kernel: srt runs the sandbox under bubblewrap on Linux and
sandbox-execon macOS. The agent reads the host but your home directory, writes its own directory and its workspace only, and reaches the hosts you allow, nothing else. - Credentials stay out: the sandbox holds a placeholder; srt's proxy puts the real value in the requests to the model's API.
- Starts in milliseconds: nothing to pull or boot. A command runs in a few milliseconds, and the agent works on your files where they are.
- Your machine's tools: the agent uses the Node.js, git and compilers of the host, read-only.
This package is in its 0.x series, and srt is itself a research preview: try it, and tell what works and what does not in the issues. Until 1.0.0, a minor release may break its API, and its changelog says how; a patch release never does. It is a community package, not affiliated with Vercel or Anthropic.
How it works
flowchart TB
subgraph host["Your machine"]
agent["HarnessAgent"] --> session["createSrtNetworkSandboxSession()"]
session -- "frames on stdin and stdout" --> supervisor
proxy["srt proxy: allowed hosts, credentials put in"]
subgraph fence["srt: bubblewrap or sandbox-exec"]
supervisor["Supervisor"] --> bridge["Harness bridge: Claude Code, Codex"]
end
end
api["Model APIs"]
agent -. "WebSocket on 127.0.0.1, through the supervisor" .-> bridge
bridge -- "every request" --> proxy
proxy --> api
Each sandbox is one process srt wraps, a small supervisor: every command, file operation and connection of the sandbox goes through it, on its standard input and output. Its processes share one filesystem view and, on Linux, one network namespace of their own, whose loopback the harness bridge listens on: the package forwards the bridge's port to a free port of this host's loopback. Every request a process makes leaves through srt's proxy, which only lets the allowed hosts through and puts the credentials in.
Requirements
- Node.js 24 or later, on Linux or macOS. Windows is not supported.
@ai-sdk/harnessand a harness adapter, such as@ai-sdk/harness-claude-code.pnpmon thePATH, which the Claude Code and Codex bridges install their dependencies with. Corepack's will do.
Linux
srt needs three programs, and user namespaces it may use:
| Program | What srt does with it | Debian, Ubuntu | Fedora | Arch |
|---|---|---|---|---|
bubblewrap | The sandbox itself: namespaces, mounts | apt install bubblewrap | dnf install bubblewrap | pacman -S bubblewrap |
socat | Relays the proxy into the sandbox's network namespace | apt install socat | dnf install socat | pacman -S socat |
ripgrep | Finds the files srt must protect | apt install ripgrep | dnf install ripgrep | pacman -S ripgrep |
All three in one go on Debian or Ubuntu:
sudo apt install bubblewrap socat ripgrep
Binaries off the PATH are named with runtime: { bwrapPath, socatPath, ripgrepPath }.
srt's seccomp filter on Ubuntu. Inside the sandbox, srt adds a seccomp filter that blocks Unix sockets, which needs a nested user namespace with capabilities. Recent Ubuntu releases refuse it two ways: the sandbox then fails to start with apply-seccomp: write /proc/self/setgroups … Permission denied, and the error says which applies.
-
Ubuntu 24.04 restricts unprivileged user namespaces (
kernel.apparmor_restrict_unprivileged_userns=1). Lift the restriction:sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 # and to keep it after a reboot: echo 'kernel.apparmor_restrict_unprivileged_userns=0' | sudo tee /etc/sysctl.d/60-srt-userns.conf -
Releases that ship the
bwrap-userns-restrictAppArmor profile (/etc/apparmor.d/bwrap-userns-restrict, checked on Ubuntu 26.04) confine everythingbwrapruns tounpriv_bwrap, which denies every capability, whatever thesysctlsays, and a local rule cannot lift adeny. The filter cannot run there.…
Description from the npm listing.
- ai
- ai-sdk
- ai-sdk-harness
- harness
- sandbox
- sandbox-runtime
- srt
- bubblewrap
- seatbelt
- claude-code
- codex
- coding-agent
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm AI SDKs plugins
All 20 ai-sdk-sandbox-runtime alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/ai-sdk-sandbox-runtime. First seen Dec 5, 2026; last successful collection Dec 6, 2026. See the methodology.