Skip to main content
In about five minutes you will start axed with a token, run a job that keeps running after you disconnect, replay its output from a byte offset, and open an interactive shell. Everything runs in Docker, so it works on Linux and macOS. You need Docker and openssl.
1

Get the image

Pull the default image and tag it axe for the commands below. It holds both binaries: the axed daemon and the axectl CLI.
To build it from a checkout instead, run docker build -t axe . in the repository. See Installation.
2

Start axed with a token

Create a Docker network and a random token, then start axed with the token mounted as a file.
The image runs as user 1000, so the token file must be readable by it. axed serves its native API on port 9090. It logs cgroups unavailable; using process groups and rlimits, which is expected in a container without a delegated cgroup. See Containers and hosts if you want cgroups.
3

Define the axectl wrapper

Run axectl in a container on the same network. This shell function passes the address and token for you.
axectl info prints the daemon’s version, instance id, and limits. In a script or CI job with no terminal, use -i instead of -it.
On Linux you can run axectl on the host instead. Start axed with -p 9090:9090 added to docker run so the port is published, copy /usr/local/bin/axectl out of the image with docker create and docker cp (as Installation does from the static image), and set AXE_ADDR=127.0.0.1:9090 and AXE_TOKEN="$(cat token)".
4

Start a long job

axectl run starts a detached process and prints its id. The process keeps running after axectl exits.
You have now disconnected. The client is gone, and the job is still running inside the sandbox.
5

Check on it

List processes. The OUTPUT column is the number of bytes the process has written so far. CPU and MEM end in * because, without a cgroup, they cover only the leader.
Print everything retained so far with axectl logs build.
6

Replay from an offset

Pass the byte count you noted back with --from to get only what came after it. This is how a client that reconnects picks up where it left off.
axed keeps the newest 1 MiB of output per process by default (--retain). If the bytes you ask for were already evicted, you get the rest along with a note of how many bytes were dropped. See Output and replay.
7

Follow live output

Add -f to keep following. Ctrl-C stops following, not the process.
8

Open a shell

Start a shell with a terminal (-t) and attach to it (-a). Ctrl-P Ctrl-Q detaches and leaves it running.
Reattach later with axectl attach -i shell. Docker claims Ctrl-P Ctrl-Q for itself, which is why the wrapper sets --detach-keys. See Terminals.
9

Kill the job and read its exit code

axectl kill sends SIGTERM to the process group. axectl wait exits with the process’s exit code.
axectl wait prints signaled 143, and echo prints 143. A process killed by a signal reports 128 plus the signal number, and SIGTERM is 15. Remove the finished record with axectl rm build.
10

Clean up

Next steps

Architecture

How axed, the adapters and the engine fit together.

Replace sandboxd

Run AXE in Kubernetes Agent Sandbox.

Run processes

Names, labels, limits, timeouts and attached runs.

axectl reference

Every command and flag.