open-daytona

High-fidelity agent sandboxes on any hardware you already have

Zhifei Li · Princeton University

Not affiliated with or endorsed by Daytona Platforms, Inc. Daytona is a trademark of its owner.

Terminal recording: with DAYTONA_V2_API_URL pointing at an open-daytona gateway, the unmodified daytona 2.3.0 SDK creates a python:3.12-slim sandbox, runs uname and a Python one-liner in it (gVisor kernel, prints 42) and deletes it
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:

0.070 s
median command round trip
Daytona: 0.156 s. With CPU admission (the default), timed from the same client machine
4.0 s
median time to a ready sandbox
Daytona: 32.1 s. All 1,536 sandboxes started at once
0
episodes lost to an infrastructure error
of 1,536, in both open-daytona runs
21/21 · 20/20
checks of the repository's SDK test pass
unmodified daytona 0.234.0 · 2.3.0
Bar charts. Median command round trip: open-daytona 0.070 s, Daytona 0.156 s. Median time from create to a ready sandbox: open-daytona 4.0 s, Daytona 32.1 s.
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. Each run's setup

Design

  1. 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 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.
  2. 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.
  3. The Daytona SDK as the client. Both protocols of the official daytona Python SDK, 0.x (the line Harbor pins; Harbor itself was not run against open-daytona) and 2.x (what a plain pip install daytona gives), work unmodified, alongside the pool's own HTTP API, a standard-library client and an asyncio adapter for RL harnesses.
Architecture: RL rollout workers send HTTP requests to gateway.py, which serves the pool's own API and both Daytona protocols, admits sandboxes at 0.8 core each in FIFO order and places them by load and cached image. The gateway forwards to pilot jobs on a Slurm cluster, each running sbxd.py under unshare -Ur with several gVisor sandboxes, sharing one image cache.
Rollout workers call one gateway; each Slurm pilot job runs one node daemon and its gVisor sandboxes.

Quickstart

One node, on Linux with unprivileged user namespaces enabled (unshare -Ur true works) and Python 3.9 or newer:

git clone https://github.com/andylizf/open-daytona.git && cd open-daytona
bash sbxd/install_runsc.sh
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 point the unmodified Daytona SDK at the gateway:

pip install daytona
export DAYTONA_V2_API_URL=http://127.0.0.1:8790/api/v2 DAYTONA_API_KEY=$(cat ~/.config/open-daytona/token)
from daytona import Daytona

sandbox = Daytona().v2.create("python:3.12-slim")
print(sandbox.exec('python -c "print(6*7)"').stdout)
sandbox.delete()

A pool on Slurm and the relay for a gateway outside the cluster are in docs/slurm.md, and the agent skills that deploy both in the README. Known gaps: no inbound ports, no Docker-in-Docker, no GPU sandboxes, and no CPU quota: a sandbox's cpu is a floor of pinned cores (full list).

Citation

@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}
}