Agent Sandbox gives AI agents an isolated sandbox backed by Docker — somewhere to run code, install packages, execute commands, and manage files without touching your machine.
- Isolated by default — each sandbox is a Docker container, fully separated from the host
- Persistent storage — every sandbox gets a dedicated
/datavolume that survives across commands - Self-hosted — runs on your own machine via Docker, no cloud or API keys required
create delete list read write upload download
| Package | Role |
|---|---|
@agent-sandbox/cli |
Human-facing command line wrapper over the core primitives |
@agent-sandbox/mcp |
MCP server that exposes the primitives as tools |
@agent-sandbox/api |
Small programmatic wrapper for app/server integration |
# install or upgrade
npm install -g @agent-sandbox/cliagent-sandbox create
agent-sandbox list{
"mcpServers": {
"agent-sandbox": {
"command": "npx",
"args": ["-y", "@agent-sandbox/mcp"]
}
}
}npm install @agent-sandbox/apiimport { AgentSandbox } from "@agent-sandbox/api";
const sandbox = new AgentSandbox();
const created = await sandbox.create();
await sandbox.write({
sandboxId: created.sandboxId,
input: "printf 'hello\\n' > /proc/1/fd/1",
});
console.log(
(
await sandbox.read({
sandboxId: created.sandboxId,
})
).output,
);
await sandbox.delete({
sandboxId: created.sandboxId,
});Use the package READMEs for package-specific usage and reference:
npx skills add https://github.com/usamaasfar/agent-sandbox/tree/main/skills/agent-sandbox-cli