Rensei docs

Daytona Sandbox

REST-based Daytona sandbox, no toolchain defaults.

The Daytona sandbox provider provisions agent sessions as Daytona workspaces via the Daytona REST API. Daytona is designed for long-lived development workspaces with filesystem archive (snapshot) support and auto-stop on idle.

How Daytona sessions work

When the platform dispatches a session to a daytona pool, DaytonaSandboxProvider.provision():

  1. Resolves the org's daytona credential (or DAYTONA_API_KEY env var).
  2. Calls POST /workspace on the Daytona API with the image, command, env vars, and resource limits.
  3. Returns a SandboxHandle with the Daytona workspace ID.

The workspace runs ghcr.io/renseiai/donmai-worker:latest by default, with donmai agent run as the launch command. The runner self-registers, polls for work, clones the repo, installs kits in-box, and runs the agent.

Capability profile

CapabilityValue
transportModeldial-in (Daytona control plane)
supportsFsSnapshottrue (workspace archive)
supportsPauseResumefalse (FS archive only, not full memory+FS)
supportsCapacityQueryfalse (no public capacity API)
maxConcurrentnull (tier-gated by Daytona)
maxSessionDurationSecondsnull (days-long workspaces supported)
oslinux
archx86_64
idleCostModelstorage-only (idle workspaces enter archived state)
billingModelwall-clock (while running)
supportsGpufalse
supportsCustomNetworkPolicyfalse
egressDefaultallow-all

Substrate defaults

Daytona class defaults do not include language toolchains - the base image bakes only the donmai runtime:

  • Runtime kinds: npm, python-pip, http, mcp-server, a2a-protocol
  • Requirement kinds: long-running, network-egress, git, full-history-clone

To add toolchain:go or toolchain:node, bake them into your custom image and add them to the pool's runtime_provides override.

Setting up a Daytona pool

Step 1: Add Daytona credentials

In Settings → Integrations, find Daytona and enter your Daytona API key. Alternatively, set DAYTONA_API_KEY in your platform environment.

Step 2: Build a custom image (if needed)

If you need language toolchains (Go, Node), build a custom image based on the donmai worker:

FROM ghcr.io/renseiai/donmai-worker:latest

# Add Go toolchain
RUN apt-get update && apt-get install -y golang-go
# ENTRYPOINT is inherited from the base image - do not override

Push to a registry accessible from Daytona and set config.image on the pool.

Step 3: Create a Daytona capacity pool

Navigate to Settings → Execution → Capacity → New pool → Daytona and configure the pool.

Pool configuration

Config keyTypeDefaultDescription
daytonaApiUrlstringhttps://app.daytona.io/apiDaytona API base URL. Override for self-hosted Daytona.
imagestringghcr.io/renseiai/donmai-worker:latestWorkspace image
diskGBnumber20Disk size per workspace in GB
userstringdaytonaWorkspace user
commandstring[]["donmai", "agent", "run"]Launch command

Example pool config

{
  "daytonaApiUrl": "https://app.daytona.io/api",
  "image": "registry.example.com/donmai-worker-go:v0.11.0",
  "diskGB": 40
}

Workspace lifecycle

Daytona workspaces cycle through these states, mapped to platform SandboxStatus:

Daytona statePlatform status
creatingprovisioning
started, runningrunning
errorfailed
othersterminated

The platform calls DELETE /workspace/{id}?force=true on terminate. Idle workspaces automatically enter an archived state after autoStopInterval minutes (default: 30 minutes, or timeoutSec / 60 if set in resources).

Auto-stop and storage costs

Daytona's auto-stop interval governs when an idle workspace enters archived state. Archived workspaces are billed at storage-only rates. The platform sets the interval from spec.resources.timeoutSec:

autoStopInterval = ceil(timeoutSec / 60)  // minutes; default 30

If a session stalls (agent crashes without calling terminate), the workspace auto-stops after the interval rather than running indefinitely.

Toolchain requirements

Daytona has no class-default toolchains. Agents requiring toolchain:go or toolchain:node will not be routed to a Daytona pool unless you bake the toolchain into the workspace image and declare it via a runtime_provides override on the pool.

After building a custom image with Go or Node installed, set the pool's runtime_provides:

{
  "runtimeKinds": ["npm", "python-pip", "http", "mcp-server", "a2a-protocol"],
  "requirementKinds": [
    "long-running",
    "network-egress",
    "git",
    "full-history-clone",
    "toolchain:node"
  ]
}

Self-hosted Daytona

For self-hosted Daytona installations, set daytonaApiUrl to your internal API endpoint:

{
  "daytonaApiUrl": "https://daytona.internal.example.com/api"
}

The credential resolver uses DAYTONA_API_URL as an env fallback before the pool's config.daytonaApiUrl.

  • Capacity Pools - pool management and runtime_provides overrides
  • E2B - alternative cloud sandbox with true pause/resume
  • Add a Provider - SandboxProvider interface

On this page