Zhifei Li · Princeton University
Design · HTTP API · Daytona SDK · Agent skills · Website
Not affiliated with or endorsed by Daytona Platforms, Inc. Daytona is a trademark of its owner.
Tip
This is an agent-native repository. Your coding agent (Claude Code, Codex, ...) can deploy a pool on your
cluster and connect your harness to it: it reads AGENTS.md for the rules and the map of the code,
and follows a skill for each task.
The unmodified daytona 2.3.0 SDK against a gateway and one node in a Linux VM. Real recording, played back at its recorded speed.
open-daytona runs isolated Linux sandboxes for agent RL inside ordinary Slurm jobs, with no root and no Docker,
and serves them through the API that the official daytona Python SDK speaks. The same 1,536 recorded terminal-agent
RL episodes were replayed on open-daytona and on Daytona's hosted service. With CPU admission on, the default, a
command round trip took 0.070 s at the median against 0.156 s on Daytona, timed from the same client machine, and no episode ended on an
infrastructure error. In a run that started all 1,536 sandboxes at once, a sandbox was ready 4.0 s after its
create against 32.1 s on Daytona. The unmodified SDK passes the repository's SDK test, 21 of 21 checks at
version 0.234.0 and 20 of 20 at 2.3.0.
open-daytona's median command round trip is under half of Daytona's, and its median time to a ready sandbox under an eighth. Command times come from the run with CPU admission (at most one running sandbox per 0.8 core, the rest queued), create times from the run that started all 1,536 sandboxes at once; Results gives each run's setup.
open-daytona turns a cluster's nodes into a sandbox service, CPU nodes for most sandboxes and NVIDIA GPU nodes for those that ask for GPUs (design.md), through three designs:
- gVisor with no privileges. gVisor is a kernel written in Go that runs in user space and
serves each sandbox's system calls. The node daemon re-executes itself under
unshare -Ur, so gVisor's runtime,runsc, runs as root of a user namespace of its own. It needs no setuid helper, and neither of the two things rootless Docker and Podman rely on an administrator for: a subuid range and a delegated cgroup. The nodes need only unprivileged user namespaces enabled. Each sandbox gets its own network stack, a disk cap with ENOSPC inside it, and a memory limit that kills its largest process with exit code 137 while the sandbox lives on. - A pool made of Slurm jobs. Pilot jobs turn ordinary allocations into capacity. Dockerfiles are built once per pool into a shared image cache, and one gateway places each create on the least-loaded node, preferring one that has the image. The gateway runs sandboxes at 0.8 core each and queues further creates in FIFO order, the density at which timing-sensitive tests and RL rewards matched Daytona.
- The Daytona SDK as the client. Both protocols of the official
daytonaPython SDK, 0.x (the line Harbor pins; unmodified Harbor passed 78 of Terminal-Bench 2.0's 89 tasks through it with the oracle agent, see daytona-compat.md) and 2.x (what a plainpip install daytonagives), work unmodified, alongside the pool's own/v1API, a standard-library client and an asyncio adapter for RL harnesses.
Rollout workers call one gateway over HTTP with a bearer token. The gateway forwards each call to the node daemon
(sbxd.py) that holds the sandbox; each daemon runs inside one Slurm pilot job and starts gVisor sandboxes there,
with builder.py pulling and building images, memenforce.py holding each sandbox to its memory limit and
netproxy.py connecting each sandbox's network stack to the node's network. The
daemon and the gateway speak the same API (docs/api.md), so a client can use one node directly or the
whole pool through the gateway. When the gateway cannot reach the compute nodes, reverse SSH tunnels carry the traffic
(docs/relay.md). How each piece works and why: docs/design.md.
Tip
To set up a pool with a coding agent, ask it: "Deploy an open-daytona pool on our Slurm cluster, following
skills/deploy-pool/SKILL.md." Then: "Point our harness at the pool, following skills/connect-sdk/SKILL.md."
Each skill checks every step and reports what it ran.
- Linux on x86_64 or aarch64 with unprivileged user namespaces (
unshare -Ur trueworks). - Python 3.9 or newer, standard library only (3.10 for the
open-daytonacommand);curl,bzip2,tar;lz4for the shared image cache. - Tens of GB of node-local disk.
- For a pool: Slurm, and a filesystem shared by the login node and the compute nodes.
On a Linux x86_64 machine, or inside a Slurm allocation:
pip install open-daytona # add [harbor] for Harbor
open-daytona up # prints DAYTONA_API_URL and DAYTONA_API_KEY
eval "$(open-daytona env)" # in any shell, while the pool runs
open-daytona down # stops the pool and its sandboxesThe Linux x86_64 wheel bundles the patched runsc and a static busybox (NOTICE lists them and their licenses), so
up itself downloads nothing and starts on a node without internet (images then come from a --shared-cache).
up checks the machine (unshare -Ur true; for GPUs, that runsc's nvproxy supports the driver), creates a token,
and starts one daemon and a gateway on 127.0.0.1 in the background, with state and logs in
~/.local/share/open-daytona. It gives sandboxes the GPUs of the allocation (CUDA_VISIBLE_DEVICES or Slurm's,
else every GPU it can open) and its memory less 10%; --gpus, --mem-gb, --port and --shared-cache change
that, and open-daytona status shows what runs.
The same from a checkout, by hand:
git clone https://github.com/andylizf/open-daytona.git && cd open-daytona
bash sbxd/install_runsc.sh # gVisor runsc + a static busybox, into ./bin
mkdir -p ~/.config/open-daytona
(umask 077; python3 -c 'import secrets; print(secrets.token_hex(32))' > ~/.config/open-daytona/token)
python3 -I sbxd/sbxd.py --bind 127.0.0.1 --port 8791 --job-dir ./tmp/job --images-dir ./tmp/images \
--runsc ./bin/runsc --token-file ~/.config/open-daytona/token --mem-gb 16 --log ./tmp/sbxd.log &
python3 -I gateway/gateway.py --port 8790 --backends 127.0.0.1:8791 &Then create a sandbox with the unmodified Daytona SDK, as in the recording above (with open-daytona up, the token is
the DAYTONA_API_KEY it printed):
pip install daytona
export DAYTONA_V2_API_URL=http://127.0.0.1:8790/api/v2 DAYTONA_API_KEY=$(cat ~/.config/open-daytona/token)
python3 -c 'from daytona import Daytona; s = Daytona().v2.create("python:3.12-slim"); print(s.exec("echo 42").stdout); s.delete()'docs/quickstart.md covers aarch64, the standard-library client, SDK 0.x, the smoke test and the asyncio RL adapter.
Clone the repository on the shared filesystem (that path is SBX_HOME), install runsc and create the token as above,
and copy slurm/open-daytona.env.example to $SBX_HOME/open-daytona.env with your partition and paths. Then submit
pilot jobs, which register their daemons under $SBX_HOME/registry/, and start the gateway on that registry:
slurm/start_pilots.sh 0:64:128 1:64:128 2:64:128 3:64:128 # one pilot job per slot:cores:mem_gb
python3 -I gateway/gateway.py --bind <address> --port 8790 --registry-dir $SBX_HOME/registrydocs/slurm.md gives every step, the relay for training on another cluster, and the scripts that reload pilots, stop them and change their memory limit.
Each run replayed the same 1,536 recorded terminal-agent RL episodes, with no model and no GPU; docs/results.md gives how each run was set up and measured.
| open-daytona, all at once | open-daytona, with CPU admission | Daytona (hosted) | |
|---|---|---|---|
| admission | none: all 1,536 at once | at most 323 running, the rest queued in FIFO order | none |
| CPU | 294 cores in all, about 0.19 core per sandbox | 259 sandbox cores, 0.8 core per sandbox | as each task requests (1 core for most, 4 for 96 of 1,536) |
| sandbox ready after create, median | 4.0 s | (time in the queue dominates) | 32.1 s |
| command round trip, median | 0.14 s | 0.070 s (172,533 commands) | 0.156 s (171,731 commands) |
99 of 104 terminal-agent tasks' reference solutions pass; the 5 that fail also fail on Daytona.
A sandbox behaves like one on a cgroup-based hosted service, except that with no cgroup its memory limit is polled and its CPU is a set of pinned cores; creates beyond the pool's CPU capacity wait in a FIFO queue. docs/semantics.md compares memory, CPU, working directory, network and disk side by side, and says how each client sees the queue.
- No inbound ports, so no preview links.
- No Docker-in-Docker, so no docker compose tasks.
- GPU sandboxes: NVIDIA only, through gVisor's nvproxy; all of a sandbox's GPUs on one node; no stop and start.
- CPU is limited by core pinning, with no quota: a sandbox can use idle neighbors' cores.
- The memory limit is polled and can overshoot.
- Memory-mapping churn, system calls and many small file reads run slower than natively.
- Network throughput per connection is below the node's.
- Dockerfiles: one FROM stage, and a few instructions unsupported.
- Cold image builds take tens of seconds to minutes per image, once per pool.
- C-c after typed-ahead input raises no SIGINT on upstream gVisor; the default x86_64 runsc fixes it.
- One gateway over plain HTTP: run it on a trusted network.
- Daytona SDK: some setters are accepted but not applied; calls outside the compatibility list are unsupported.
replay/ records agent episodes, replays them against a sandbox backend with no model, and compares what the
environment returned across runs. Usage: replay/README.md.
| path | contents |
|---|---|
sbxd/ |
node daemon, memory enforcer, image builder, network proxy, install_runsc.sh |
gateway/ |
gateway and the Daytona-SDK layer, systemd unit example |
client/ |
standard-library Python client |
slurm/ |
pilot job, submit/stop/reload scripts, site config example, optional relay |
replay/ |
record–replay parity tools (replay/README.md) |
examples/ |
asyncio RL harness adapter |
patches/, scripts/ |
the gVisor patches the default runsc carries, the script that builds that runsc, and the script that builds the PyPI wheels (build_wheels.sh; the Linux x86_64 wheel bundles runsc and busybox, see NOTICE) |
tests/ |
single-node smoke test, Daytona SDK test, admission test |
docs/ |
quickstart, Slurm pool, results, semantics, known gaps, design, API, relay, Daytona compatibility, public trial; docs/assets/ holds the README's figures and the script that draws them |
AGENTS.md, skills/ |
instructions and skills for coding agents |
site/ |
the project page, deployed by .github/workflows/pages.yml |
Contributions are welcome, and a coding agent is a good way to make one:
- Point the agent at
AGENTS.md: the rules, the repository map and the commands to test a change. - A pull request states what it changes and the command and result that show it works, at the level it was checked (one node, a pool, an SDK version).
- For a larger change, open an issue first.
Questions and bug reports go to GitHub issues.
If you use open-daytona in your research, please cite it (CITATION.cff):
@software{li2026opendaytona,
author = {Li, Zhifei},
title = {open-daytona: High-Fidelity Agent Sandboxes on Any Hardware You Already Have},
year = {2026},
url = {https://github.com/andylizf/open-daytona}
}Apache-2.0 (LICENSE). gVisor, also Apache-2.0, is not in the source tree. sbxd/install_runsc.sh fetches
runsc from this repository's release, built from gVisor's source plus the six patches in patches/, and
checks it against a SHA-256 pinned in the script. With --upstream it fetches gVisor's own release and checks its
published SHA-512.