Are you the author? Sign in to claim
Self-hostable sandbox for agent code execution — SandboxManager, control-plane, 4 SDKs, MCP server, running inside real
Website · Quickstart · Docs · Self-hosting · Security · Examples
The missing batteries-included, self-hostable sandbox for agent code execution.
Most "agent sandbox" projects give you raw isolation — a pod, a VM, a container —
and leave you to build the tool surface an LLM agent actually needs on top of it.
boxkite is the other half: a complete bash/python/file/search/process tool
surface running inside real Kubernetes pod isolation, self-hostable end to end.
Point your agent framework at it and you have a real sandbox in minutes, on
infrastructure you control.
Who this is for: teams building their own agent products that need
isolated, multi-tenant code execution at scale. It's not a single-user
local dev-session sandbox like the built-in bash tool in an IDE or CLI
coding agent — if you just want your own assistant to run shell commands on
your machine, boxkite is the wrong layer.
git clone https://github.com/EvAlssment/boxkite.git boxkite && cd boxkite
pip install -e . # NOT "pip install boxkite" -- see note below
boxkite up # builds + starts sandbox, sidecar, and local MinIO
boxkite exec "python3 -c 'print(1 + 1)'"
The PyPI name is
boxkite-sandbox, notboxkite(already taken) — the import path (import boxkite) and theboxkiteCLI command are unaffected.
from uuid import uuid4
from boxkite import SandboxManager
from boxkite.tools import create_sandbox_tool_specs
manager = SandboxManager()
session_id = str(uuid4())
await manager.create_session(organization_id=uuid4(), session_id=session_id)
specs = create_sandbox_tool_specs(sandbox_manager=manager, session_id=session_id)
bash_tool = next(s for s in specs if s.name == "bash_tool")
result = await bash_tool.handler(command="echo hello from boxkite")
Framework adapters (boxkite.tools.adapters) convert the same tool specs for
LangChain, LlamaIndex, the OpenAI Agents SDK, or plain OpenAI/Anthropic/
Gemini/Mistral function-calling schemas — see the
full integration guide
and examples/ for a runnable version of every framework.
Everything in this repo — including the control-plane/ hosted multi-tenant
API — is something you deploy yourself:
deploy/rbac.yaml/
network-policy.yaml/pod-security-policy.yaml, or
helm install boxkite deploy/helm/boxkite. This chart does not deploy
the control-plane itself (it has no Deployment/Service) — the per-session
sandbox pods are created programmatically by the control-plane at runtime.
Then deploy the control-plane/ API separately (see the Render button
below or the developer docs).
A local kind cluster works too: ./deploy/local-kind/setup.sh.docker-compose mode shares a PID namespace with the sandbox container and execs into it via
nsenter, the same mechanism the Kubernetes runtime uses — it no longer needs (or mounts) the host's Docker socket. See SECURITY.md for the current list of disclosed limitations.
Full walkthroughs for every path above (Kubernetes, Helm, Render, the
boxkite CLI's hosted mode, secrets, webhooks, MCP, and every SDK) live on
the developer docs site.
One repo, several independently-versioned pieces, kept together deliberately (see CONTRIBUTING.md):
| Piece | What it is |
|---|---|
src/boxkite/ (boxkite-sandbox on PyPI) | The core: SandboxManager, WarmPoolManager, and the 15+ tool boxkite.tools surface. Embed this directly against your own cluster. |
sidecar/ | The FastAPI service that runs in every sandbox pod — filesystem I/O, command exec via nsenter, storage sync. |
control-plane/ | Optional hosted-API layer in front of SandboxManager — accounts, API keys, fair-use limits. |
sdk-python/, sdk-js/, sdk-go/, sdk-rust/ | Thin HTTP clients for your own running control-plane. |
mcp-server/ (boxkite-mcp) | Wraps the Python SDK as an MCP tool source for Claude Code, Claude Desktop, Codex, or Cursor. |
handoff-cli/ (boxkite-handoff) | Moves an in-progress local Claude Code/Codex CLI/opencode session into a fresh sandbox, full conversation history included — see docs/handoff-adapters.md. Not yet published. |
bastion/ | Standalone SSH server bridging into a session's human-takeover WebSocket. |
deploy/ | Kubernetes manifests, Helm chart, Dockerfiles, docker-compose, Render Blueprint. |
examples/ | Runnable cookbook — LangGraph, LangChain, raw HTTP, OpenAI/Gemini/Mistral function calling, and more. |
boxkite executes arbitrary, agent-generated code — its security posture is
layered defense in depth: a per-pod shared-secret sidecar auth token, a
fresh empty network namespace on every exec call, non-root execution with
every Linux capability dropped, and a read-only root filesystem. No single
one of these is meant to stand alone.
See SECURITY.md for the full model, known limitations, and how to report a vulnerability privately — this project runs arbitrary code, so a sandbox-escape report deserves a fast, private path, not a public issue. The security model guide covers the same ground with runnable examples.
| Package | Registry |
|---|---|
boxkite-sandbox | PyPI |
boxkite-client (Python) | PyPI |
boxkite-client (JS/TS) | npm |
boxkite-mcp | PyPI |
boxkite-client (Go) | pkg.go.dev |
boxkite-client (Rust) | crates.io |
Apache 2.0 — permissive, with an explicit patent grant. Use, modify, self-host, or build a competing hosted service on top of boxkite; there's no restriction.
See CONTRIBUTING.md — we use the Developer Certificate of
Origin (git commit -s), not a CLA.
40+ tools for querying dashboards, alerts, datasources, and logs in Grafana
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases