agent-sandbox

module
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0

README

Agent Sandbox

Agent Sandbox

Fast, Multi-Cloud Sandbox Engine for AI Agents

Issues PRs Welcome Tests Lint

Website OpenAPI Documents DeepWiki


What is Agent Sandbox?

Agent Sandbox is an open-source sandbox engine for AI agents. It runs on Kubernetes, serves the E2B API, and gives an agent, an evaluation or a training loop its own isolated environment in the time it takes to swap a container image.


How it works

Sandboxes are claimed, not created. A pool holds Pods that are already running, so serving a request is an in-place image swap rather than a scheduling round-trip. Capacity is a number you decide — a pool's replica count — and the autoscaler moves it as demand changes.

There is no build step. An E2B template is a snapshot compiled from a Dockerfile; here you name a container image when you create the sandbox, and the platform swaps it in. Any image your cluster can pull is a workload.

Platform and sandboxes are two surfaces. abx addresses the platform — environments, warm pools, autoscaling, quotas, templates — and the E2B SDK addresses the sandboxes themselves. The line is deliberate: sandbox work needs no new client, and platform work needs no SDK.


Install

The platform (Kubernetes + Helm)

helm upgrade --install agent-sandbox-worker \
  oci://ghcr.io/scitix/agent-sandbox-worker \
  --namespace agentbox-system --create-namespace \
  --set controller.localClusterId=YOUR_CLUSTER_ID

That release is the whole platform on one cluster: the CRDs, the controller and API, and the data plane sandboxes are reached through. localClusterId is required — it is how a pool is placed on a cluster segment.

The console is a second, optional release that reads the same API:

helm upgrade --install agent-sandbox-hub \
  oci://ghcr.io/scitix/agent-sandbox-hub \
  --namespace agentbox-system \
  --set env.secret="$(openssl rand -hex 32)" \
  --set clusters[0].id=YOUR_CLUSTER_ID \
  --set clusters[0].url=http://agent-sandbox-api.agentbox-system.svc.cluster.local \
  --set ingress.host=agentbox.example.com

→ Installation guide — prerequisites, the services you get, the shared secret between the two releases, and how to remove it all again.

The CLI, and the skills

curl -fsSL https://oss-ap-southeast.scitix.ai/scitix/packages/agentbox/cli/latest/install.sh | sh

abx context set YOUR_DEPLOYMENT \
  --endpoint 'https://YOUR_CONSOLE/agentbox' \
  --api-key agbx_...

abx clusters

abx is a single binary with no runtime dependencies. The same script writes nine skills to ~/.agents/skills — the vocabulary an agent reads before it touches the platform, from abx-common (endpoint, key, cluster, approvals) to abx-sandbox-secrets. Claude Code users can install the plugin instead: /plugin marketplace add scitix/agent-sandbox.

→ CLI guide · Skills · E2B SDK guide

Every page is also a plain-text document: append .md to any docs URL (/docs/concepts/pools.md), or hand an agent llms-full.txt.


Use Cases

Reinforcement Learning at Scale

RL training requires thousands of environment resets per hour. Agent Sandbox pre-warms a pool of sandboxes so each rollout worker gets a fresh, isolated environment in milliseconds — removing the environment-reset bottleneck from your training loop. Supports SWE-bench Verified, SWE-Gym, Terminal-bench, and custom task distributions.

AI Coding Agents & Evaluations

Give every agent turn or eval call its own isolated execution environment. The E2B-compatible API means existing SWE-agent, SWE-ReX, and similar frameworks work without modification.

Enterprise Multi-Cluster Deployment

Deploy sandbox pools across multiple clouds or regions. The built-in ExtProc routing layer dispatches requests to the most available cluster transparently — no routing logic required in application code. Supported cloud providers: AWS, Google Cloud, Azure, Alibaba Cloud, Volcengine, Cloudflare.

Coming soon: microVM-backed sandboxes for stronger isolation guarantees.


Documentation

Resource Link
Documentation site scitix.github.io/Agent-Sandbox
Installation — Helm, the CLI and the skills /docs/installation
Concepts — the object model, envs, pools, autoscaling /docs/concepts
CLI guide — abx, endpoints and keys /docs/tutorials/cli
E2B SDK guide — creating and driving sandboxes /docs/tutorials/e2b
Skills — the nine files an agent installs /docs/skills
Examples — templates and environments to apply /docs/examples
Designs — the egress filter, cross-cluster routing, our envd patches /docs/designs
Managed agents — the Brain/Hands split /docs/tutorials/managed-agents/brain-hands
API Reference (OpenAPI) /docs/api/sandboxes/CreateSandbox

Contributing

Contributions are welcome — bug reports, feature requests, documentation, and code. Please read CONTRIBUTING.md before submitting a pull request.

All commits must include a Signed-off-by line (DCO). Use git commit -s.


License

Apache License 2.0 — see LICENSE for details.

Copyright © 2026 ScitiX.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the agents v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the agents v1alpha1 API group.
cmd
egressproxy command
Command egressproxy is the sandbox egress filter.
Command egressproxy is the sandbox egress filter.
envoyextproc command
envoyextproc is the Envoy ExternalProcessor companion process for the agent-sandbox data plane.
envoyextproc is the Envoy ExternalProcessor companion process for the agent-sandbox data plane.
envoyextproc/app
Package extproc contains the bootstrap logic for the envoyextproc binary (cmd/envoyextproc).
Package extproc contains the bootstrap logic for the envoyextproc binary (cmd/envoyextproc).
sandbox command
sandbox is the open-source build of the agentbox operator.
sandbox is the open-source build of the agentbox operator.
sandbox/app
Package controller contains the core bootstrap logic for the agentbox operator (cmd/sandbox).
Package controller contains the core bootstrap logic for the agentbox operator (cmd/sandbox).
sandbox/app/extconfig
Package extconfig defines the schema and loader for the extension configuration file (--extension-config).
Package extconfig defines the schema and loader for the extension configuration file (--extension-config).
wsproxy command
wsproxy is the AgentBox WebSocket proxy sidecar.
wsproxy is the AgentBox WebSocket proxy sidecar.
wsproxy/app
Package wsproxy contains the bootstrap logic for the wsproxy sidecar (cmd/wsproxy).
Package wsproxy contains the bootstrap logic for the wsproxy sidecar (cmd/wsproxy).
pkg
activity
Package activity holds the timing contract that two independent components have to agree on for idle-timeout eviction to be correct:
Package activity holds the timing contract that two independent components have to agree on for idle-timeout eviction to be correct:
apiserver/approval
Package approval holds writes made with an agent's credential until a human says yes.
Package approval holds writes made with an agent's credential until a human says yes.
apiserver/gen
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.
apiserver/handlers
Package handlers implements the StrictServerInterface generated from the OpenAPI spec.
Package handlers implements the StrictServerInterface generated from the OpenAPI spec.
apiserver/service/envautoscaler
Package envautoscaler serves the Env-scoped autoscaler-config CRUD surface.
Package envautoscaler serves the Env-scoped autoscaler-config CRUD surface.
apiserver/service/envcommon
Package envcommon hosts the helpers shared between the env shell service (pkg/apiserver/service) and the per-resource sub-services (envmember, envautoscaler).
Package envcommon hosts the helpers shared between the env shell service (pkg/apiserver/service) and the per-resource sub-services (envmember, envautoscaler).
apiserver/service/envmember
Package envmember serves the Env-scoped Pool CRUD surface: `/v1/sandboxenvs/{name}/sandboxpools/*`.
Package envmember serves the Env-scoped Pool CRUD surface: `/v1/sandboxenvs/{name}/sandboxpools/*`.
apiserver/service/envscheduler
Package envscheduler implements the in-process Env-level request router.
Package envscheduler implements the in-process Env-level request router.
apiserver/service/federation
Package federation holds the Worker-side soft-state view of cross-cluster SandboxEnv capacity.
Package federation holds the Worker-side soft-state view of cross-cluster SandboxEnv capacity.
controllers/sandboxenv
Package sandboxenv implements the SandboxEnv Reconciler.
Package sandboxenv implements the SandboxEnv Reconciler.
controllers/sandboxenv/poolrender
Package poolrender produces a fully rendered SandboxPool CR from an Env + Member + SandboxTemplate triple.
Package poolrender produces a fully rendered SandboxPool CR from an Env + Member + SandboxTemplate triple.
controllers/sandboxpool/autoscalingstate
Package autoscalingstate hosts the read-snapshot / write-accumulator abstraction used by the SandboxPool autoscaler.
Package autoscalingstate hosts the read-snapshot / write-accumulator abstraction used by the SandboxPool autoscaler.
controllers/sandboxpool/poststarthooks
Package poststarthooks executes post-start hook actions on sandbox pods that have just transitioned Starting → Running.
Package poststarthooks executes post-start hook actions on sandbox pods that have just transitioned Starting → Running.
e2bcompat
Package e2bcompat provides an E2B-compatible HTTP API server for AgentBox.
Package e2bcompat provides an E2B-compatible HTTP API server for AgentBox.
e2bcompat/domain
Package domain provides E2B-compatible conversion utilities.
Package domain provides E2B-compatible conversion utilities.
e2bcompat/gen
Package e2bgen provides primitives to interact with the openapi HTTP API.
Package e2bgen provides primitives to interact with the openapi HTTP API.
e2bcompat/handlers
Package handlers implements the E2B-compatible StrictServerInterface generated by oapi-codegen.
Package handlers implements the E2B-compatible StrictServerInterface generated by oapi-codegen.
e2bcompat/router
Package router provides E2B-compatible HTTP route registration.
Package router provides E2B-compatible HTTP route registration.
e2bcompat/router/middleware
Package middleware provides E2B-compatible authentication middleware.
Package middleware provides E2B-compatible authentication middleware.
egressproxy
Package egressproxy implements the transparent sandbox egress filter: a userspace proxy that all sandbox TCP is iptables-REDIRECT'd through, plus the redirect installer and the on-disk policy contract the control plane writes.
Package egressproxy implements the transparent sandbox egress filter: a userspace proxy that all sandbox TCP is iptables-REDIRECT'd through, plus the redirect installer and the on-disk policy contract the control plane writes.
envoy/extproc
Package extproc implements an Envoy ExternalProcessor (ExtProc) gRPC server.
Package extproc implements an Envoy ExternalProcessor (ExtProc) gRPC server.
framework
Package framework defines the host/extension contract shared by every extension point in AgentBox (SandboxPool lifecycle Plugins, quota Providers, and future Providers such as billing or telemetry).
Package framework defines the host/extension contract shared by every extension point in AgentBox (SandboxPool lifecycle Plugins, quota Providers, and future Providers such as billing or telemetry).
framework/plugins/egress
Package egress provides the PreCreatePod plugin that injects the sandbox egress filter (an init container that installs the iptables redirect and a native sidecar that runs the proxy) into Pods of Pools whose Spec.NetworkPolicy is set.
Package egress provides the PreCreatePod plugin that injects the sandbox egress filter (an init container that installs the iptables redirect and a native sidecar that runs the proxy) into Pods of Pools whose Spec.NetworkPolicy is set.
framework/providers/instancetype
Package instancetype defines the catalog abstraction for "named base resource shapes that a sandbox can scale up from by an integer multiplier".
Package instancetype defines the catalog abstraction for "named base resource shapes that a sandbox can scale up from by an integer multiplier".
framework/providers/quota/quotatest
Package quotatest holds the quota Provider doubles the rest of the tree shares.
Package quotatest holds the quota Provider doubles the rest of the tree shares.
framework/providerset
Package providerset bundles every framework Provider into a single value passed to Plugin Factories.
Package providerset bundles every framework Provider into a single value passed to Plugin Factories.
lifecycle/armnotify
Package armnotify carries the arming verdict for a claimed sandbox from the post-start hook runner to the create request waiting on it.
Package armnotify carries the arming verdict for a claimed sandbox from the post-start hook runner to the create request waiting on it.
lifecycle/lastcreate
Package lastcreate hosts the in-process Sandbox.Create timestamp tracker that the Pool autoscaler's quiet-window gate consumes.
Package lastcreate hosts the in-process Sandbox.Create timestamp tracker that the Pool autoscaler's quiet-window gate consumes.
lifecycle/schedule
Package schedule implements the per-pool streaming claim scheduler.
Package schedule implements the per-pool streaming claim scheduler.
metrics
Package metrics defines and registers all custom Prometheus metrics for AgentBox.
Package metrics defines and registers all custom Prometheus metrics for AgentBox.
sandboxrender
Package sandboxrender turns an EmbeddedSandboxTemplate + overrides into the concrete Pool spec consumed by the SandboxPool controller.
Package sandboxrender turns an EmbeddedSandboxTemplate + overrides into the concrete Pool spec consumed by the SandboxPool controller.
templateimages
Package templateimages checks the images produced by the same registry rewrite rules as pool rendering.
Package templateimages checks the images produced by the same registry rewrite rules as pool rendering.
utils/accesstoken
Package accesstoken mints the per-sandbox tokens that secure the data plane, and names the headers and envd control paths that go with them.
Package accesstoken mints the per-sandbox tokens that secure the data plane, and names the headers and envd control paths that go with them.
utils/dockerconfig
Package dockerconfig builds and parses Kubernetes `.dockerconfigjson` payloads for imagePullSecret Secrets of type kubernetes.io/dockerconfigjson.
Package dockerconfig builds and parses Kubernetes `.dockerconfigjson` payloads for imagePullSecret Secrets of type kubernetes.io/dockerconfigjson.
utils/hostalias
Package hostalias provides an in-process /etc/hosts-style resolver driven by the Manager-pushed ClusterConfig.HostAliases list.
Package hostalias provides an in-process /etc/hosts-style resolver driven by the Manager-pushed ClusterConfig.HostAliases list.
utils/httpctx
Package httpctx provides shared helpers for extracting authentication context from gin-based HTTP handlers.
Package httpctx provides shared helpers for extracting authentication context from gin-based HTTP handlers.
utils/httplog
Package httplog centralizes HTTP request logging for the AgentBox API servers.
Package httplog centralizes HTTP request logging for the AgentBox API servers.
utils/k8sname
Package k8sname provides validation for Kubernetes resource names with a stricter variant of RFC 1123 DNS label rules: names must start with a lowercase letter (not a digit).
Package k8sname provides validation for Kubernetes resource names with a stricter variant of RFC 1123 DNS label rules: names must start with a lowercase letter (not a digit).
utils/logclient
Package logclient reads container logs from the platform's central log service.
Package logclient reads container logs from the platform's central log service.
utils/promclient
Package promclient is a small read-only client for a Prometheus-compatible query API.
Package promclient is a small read-only client for a Prometheus-compatible query API.
utils/resource
Package resource provides utilities for computing resource sums across Pod containers.
Package resource provides utilities for computing resource sums across Pod containers.
version
Package version holds the build-time version for all AgentBox components.
Package version holds the build-time version for all AgentBox components.
wsmux
Package wsmux adapts a gorilla/websocket connection into a net.Conn so that yamux can multiplex independent logical streams on top of it, and gRPC can run on top of yamux.
Package wsmux adapts a gorilla/websocket connection into a net.Conn so that yamux can multiplex independent logical streams on top of it, and gRPC can run on top of yamux.
wsproxy/config
Package config holds the wsproxy runtime configuration.
Package config holds the wsproxy runtime configuration.
wsproxy/gen
Package wsproxygen provides primitives to interact with the openapi HTTP API.
Package wsproxygen provides primitives to interact with the openapi HTTP API.
wsproxy/server
Package server provides the two HTTP servers for wsproxy:
Package server provides the two HTTP servers for wsproxy:
wsproxy/syncmgr
Package syncmgr implements the WSProxy sync manager that maintains persistent WebSocket connections to every Worker cluster and pushes API key, SandboxTemplate, and ClusterConfig updates.
Package syncmgr implements the WSProxy sync manager that maintains persistent WebSocket connections to every Worker cluster and pushes API key, SandboxTemplate, and ClusterConfig updates.
wsproxy/syncmgr/handlers
Package handlers implements the wsproxygen.StrictServerInterface for the internal management API (:9004).
Package handlers implements the wsproxygen.StrictServerInterface for the internal management API (:9004).
wsproxy/wsdial
Package wsdial wraps the gorilla WebSocket handshake so a failure says what the peer actually answered.
Package wsdial wraps the gorilla WebSocket handshake so a failure says what the peer actually answered.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL