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():
- Resolves the org's
daytonacredential (orDAYTONA_API_KEYenv var). - Calls
POST /workspaceon the Daytona API with the image, command, env vars, and resource limits. - Returns a
SandboxHandlewith 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
| Capability | Value |
|---|---|
transportModel | dial-in (Daytona control plane) |
supportsFsSnapshot | true (workspace archive) |
supportsPauseResume | false (FS archive only, not full memory+FS) |
supportsCapacityQuery | false (no public capacity API) |
maxConcurrent | null (tier-gated by Daytona) |
maxSessionDurationSeconds | null (days-long workspaces supported) |
os | linux |
arch | x86_64 |
idleCostModel | storage-only (idle workspaces enter archived state) |
billingModel | wall-clock (while running) |
supportsGpu | false |
supportsCustomNetworkPolicy | false |
egressDefault | allow-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 overridePush 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 key | Type | Default | Description |
|---|---|---|---|
daytonaApiUrl | string | https://app.daytona.io/api | Daytona API base URL. Override for self-hosted Daytona. |
image | string | ghcr.io/renseiai/donmai-worker:latest | Workspace image |
diskGB | number | 20 | Disk size per workspace in GB |
user | string | daytona | Workspace user |
command | string[] | ["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 state | Platform status |
|---|---|
creating | provisioning |
started, running | running |
error | failed |
| others | terminated |
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 30If 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.
Related pages
- Capacity Pools - pool management and
runtime_providesoverrides - E2B - alternative cloud sandbox with true pause/resume
- Add a Provider - SandboxProvider interface