The Agent Execution Engine runs processes and moves files inside agent sandboxes.
Documentation · Quickstart · Architecture · API reference · Security
Every sandbox platform for AI agents needs a component inside the sandbox that runs commands, streams their output, and reads and writes files for the agent outside. Each platform writes its own: E2B has envd, Kubernetes Agent Sandbox has sandboxd, Agent Substrate has its guest, and Kata has its agent.
AXE is one implementation of that component that any platform can use. It keeps processes running when clients disconnect, replays their output from any point, survives snapshot and restore, and confines file access so untrusted code cannot escape the workspace.
Note
Scope. AXE runs inside a sandbox. It does not create, isolate or schedule sandboxes. Containers, gVisor or Firecracker provide the isolation, and AXE runs in whatever they provide.
- An engine library.
crates/axesupervises processes, keeps their output, confines file access and applies resource limits. It has no network code, so you can link it into your own agent. - A daemon.
axedserves the engine over gRPC, REST and MCP, on TCP, Unix sockets, vsock or an inherited descriptor. It is usually the sandbox's first process. - Adapters for existing protocols.
axedspeaks Kubernetes Agent Sandbox's and Agent Substrate's APIs, so their existing clients work without changes. With--mcp-listen, it also serves MCP tools that agents can use directly.
- Drop-in for sandboxd. Replace the image in an Agent Sandbox template and change nothing else. The official Go, Python and TypeScript SDKs work unmodified.
- Processes outlive their clients. A client that reconnects, for example after a snapshot restore, picks up output from the last byte it saw.
- Snapshot-aware. AXE detects a suspend when the platform's clocks show the gap, as under gVisor, and the platform can report a restore with
axectl resumedwhere they do not, as on Firecracker. Timeouts count only running time, so a sandbox paused for an hour does not wake up and kill its jobs. - Safe with untrusted code. File paths cannot be redirected outside the workspace, new and replaced files appear only when their upload completes, and memory, processes and connections are all capped.
- Small. About 5 MiB of memory at idle, under a sixth of sandboxd's, and a 6 MB static binary.
Note
Prebuilt images. Each release publishes ghcr.io/vincent0426/axe:X.Y.Z (the default image, also tagged X.Y and latest except for prereleases) and ghcr.io/vincent0426/axe:X.Y.Z-static for amd64 and arm64, and attaches static binaries to its GitHub release. Use ghcr.io/vincent0426/axe:latest in place of a local build in the steps below. See Installation.
Build the image and use it wherever an Agent Sandbox template names sandboxd's image:
docker build -t axe .
docker run --rm -p 8080:8080 -p 9090:9090 axeThe image has the same layout as sandboxd's (details), so both of upstream's deployment templates work unchanged.
The static image holds just the axed daemon and the axectl CLI, ready to copy into any image or microVM root filesystem:
docker build --target static -t axe:static .COPY --from=axe:static /axed /axectl /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/axed", "--listen", "vsock://any:1024?auth=none", "--agent-sandbox=false"]From the host, point axectl at it with AXE_ADDR=vsock://<cid>:1024 where the hypervisor exposes guest vsock directly, or through the platform's vsock proxy where it does not, as with Firecracker's Unix socket. The Firecracker guide shows a complete setup.
Then drive it with axectl:
axectl run --name build -- make -j8 # start a process that keeps running
axectl logs -f build # replay its output and follow it
axectl run -t -a -- bash # open an interactive shellLink crates/axe into your own agent instead of running the daemon. examples/embed.rs is a complete program:
cargo run -p axe --example embed # on Linux
scripts/dev cargo run -p axe --example embed # on macOSThe quickstart walks through a full session with axectl in Docker, and the documentation covers each way of using AXE.
Compared with sandboxd, both built for production and run on the same machine:
| AXE | sandboxd | |
|---|---|---|
| Memory at idle | 4.6 MiB | 30.4 MiB |
| Threads with 100 processes running | 5 | 106 |
| Startup | 4.3 ms | 17.7 ms |
| Command latency, 99th percentile | 0.85 ms | 1.85 ms |
| Output streaming, 4 streams | 1.0 GB/s | 0.43 GB/s |
| 64 MiB download | 13.2 ms | 12.4 ms |
| 64 MiB upload | 53.4 ms | 54.9 ms |
File transfers are about even. Full results.
| Platform | Status |
|---|---|
| Linux containers | Supported |
| Kubernetes Agent Sandbox | Supported, as a drop-in for sandboxd |
| Agent Substrate | Supported, as a drop-in guest |
| gVisor | Supported, including checkpoint and restore |
| Firecracker | Supported, including snapshot and restore |
The deployment guides cover each platform, and platform requirements list what AXE needs from Linux.
The full documentation is at axe-engine.mintlify.site:
- Quickstart: a five-minute session with the daemon and
axectl. - Architecture: how the engine, the daemon and the adapters fit together.
- Deploy: Kubernetes Agent Sandbox, Agent Substrate, Firecracker, gVisor, plain containers, and agents over MCP.
- Embed in Rust: use the engine as a library.
- Reference: flags, CLI, APIs, error codes and sandboxd compatibility.
AXE targets Linux. scripts/dev runs any command in a Linux container, so development also works on macOS.
scripts/dev cargo test --workspaceAXE is not an isolation boundary; the sandbox around it is. To report a vulnerability, see SECURITY.md.
AXE is licensed under the Apache License 2.0. The protocol definitions in proto/process and proto/watcher are copyright The Kubernetes Authors, and proto/ateenv is copyright Google LLC, under the same license.