Skip to main content
axed is a drop-in replacement. It uses the same flags, ports, image layout and wire formats, and the Go, Python and TypeScript SDKs work unmodified.

Build and push the image

The image has the same layout as sandboxd’s, including the binary at /usr/local/bin/sandboxd. Installation lists the details.

Change the template

Upstream’s example templates use one of two topologies. Both work with only the image reference changed; they were tested on a kind cluster with upstream’s Go client example and the TypeScript SDK.
The daemon’s image is the execution environment. Replace sandboxd’s image in the container spec:
To add tools for the agent, build your own image FROM the axe image, the way upstream suggests for sandboxd’s.
Everything else in the templates stays as it is: runAsNonRoot, allowPrivilegeEscalation: false, dropped capabilities, resource limits and the emptyDir workspace.

Flags

axed accepts sandboxd’s command line as Go parses it: every sandboxd flag with the same defaults (--stream-chunk-size’s default of 0 selects a larger size; see compatibility), single-dash flags such as -root-dir, Go durations such as 1.5s, and controller-runtime’s --zap-* logging flags. Existing command and args work unchanged. axed also has its own flags, such as --retain, --output-budget and --cgroups. See the axed reference for all of them, and sandboxd compatibility for every place axed intentionally behaves differently.

Try it locally

Build it as axe (docker build -t axe .) and run it with the same restrictions a sandbox pod has: a non-root user, no capabilities, no privilege escalation, and a writable workspace.
It logs two expected lines: cgroups unavailable; using process groups and rlimits, because a pod has no delegated cgroup, and a warning that no auth token is set.

Files over REST

The file API is on port 8080:
The health check returns, for example, {"status":"ok","uptime_seconds":1}.

Processes over gRPC

Processes are on port 9090. axed serves gRPC reflection, so grpcurl needs no proto files. Reflection needs the token like any other call, so once you configure one, pass it with -H 'authorization: Bearer <token>'. Run it from its image; --network host reaches the published port on Linux and Docker Desktop.
Output fields are base64, as gRPC’s JSON mapping requires for bytes. Fields equal to zero, such as an exit code of 0, are left out. The SDKs find their sandbox through Kubernetes, so they need a cluster, such as a local kind cluster. Remove the container when you are done: docker rm -f axe-pod.

Require a token

Mount a file holding the token, for example from a Secret, and pass --auth-token-file:
Clients then send Authorization: Bearer <token> or X-Sandboxd-Token: <token> on every call. GET /v1/health never needs the token, so the readiness probe keeps working. Instead of the file you can pass the token’s hex SHA-256 with --auth-token-sha256. See Security.

Reference

Agent Sandbox API

Every REST endpoint and gRPC method the adapter serves.

sandboxd compatibility

Every intentional difference from sandboxd.