> ## Documentation Index
> Fetch the complete documentation index at: https://agent-compass.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Daytona

The Daytona provider creates one remote sandbox for each task execution. Use it when you want an isolated Linux workspace without consuming local compute.

A matched [recipe](/en/user_guide/other_features/recipes) can supply defaults such as the image and workspace; compatible explicit settings are usually preserved. Daytona requires a reachable service and credentials that can manage sandboxes.

## Before You Start

1. Create an account in the [Daytona Dashboard](https://app.daytona.io/), then create a key on the [API keys page](https://app.daytona.io/dashboard/keys).
2. Set `DAYTONA_API_KEY`. Self-hosted or multi-target deployments can also set `DAYTONA_API_URL` and `DAYTONA_TARGET`.
3. Do not commit credentials. Use a secret store for CI.

You can instead set `api_key`, `api_url`, and `target` in a private configuration file. Environment variables are generally more convenient for shells and CI.

<a id="run-one-task" />

## Validate the Configuration with `run`

This example uses SWE-bench Verified with mini-swe-agent. It selects one task through [`sample_ids`](/en/user_guide/modules/benchmarks/overview#shared-benchmark-fields), and the matched recipe selects its Daytona-compatible image and workspace:

```bash theme={"system"}
agentcompass run swebench_verified mini_swe_agent "$MODEL_NAME" \
  --env daytona \
  --benchmark-params '{"sample_ids":["astropy__astropy-12907"]}'
```

The command above is a minimal `agentcompass run` check. See [`agentcompass run`](/en/user_guide/using_agentcompass/cli/run) for model endpoint and other shared options.

Daytona also supports `agentcompass launch`. Put shared Daytona settings under `defaults.environment` in the orchestration file, or request-specific settings under `requests[].environment`; write `id: daytona` and the Daytona parameters at the same level. See the [`launch` mapping rules](/en/user_guide/using_agentcompass/cli/launch#mapping-rules).

<a id="provider-params" />

## Parameter Reference

Pass parameters with `--env-params`, or place them under `environments.daytona` in a configuration file.

The example above continues to use Daytona credentials from environment variables, while the recipe supplies the task image. Add the following option to request 2 vCPUs, 4 GiB of memory, and 8 GiB of disk for each image-based sandbox:

```bash theme={"system"}
--env-params '{"resources":{"cpu":2,"memory":4,"disk":8}}'
```

`resources` applies only to the `image` startup path. AgentCompass does not send it when `snapshot` is explicit or when Daytona uses its default snapshot because no startup source is set.

### Connection and Credentials

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'840px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'230px'}}>Field</th><th style={{width:'210px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'230px'}}><code>api\_key</code></td><td style={{width:'210px'}}><code>DAYTONA\_API\_KEY</code></td><td>Daytona API key. When unset, AgentCompass reads the environment variable; JWT authentication is an alternative.</td></tr>
      <tr><td style={{width:'230px'}}><code>api\_url</code></td><td style={{width:'210px'}}><code>DAYTONA\_API\_URL</code></td><td>Daytona API root URL. If the environment variable is also unset, the SDK defaults to <code>[https://app.daytona.io/api](https://app.daytona.io/api)</code>.</td></tr>
      <tr><td style={{width:'230px'}}><code>target</code></td><td style={{width:'210px'}}><code>DAYTONA\_TARGET</code></td><td>Target identifier configured in Daytona that selects the sandbox execution location or region. When unset, Daytona uses the organization's default region.</td></tr>
      <tr><td style={{width:'230px'}}><code>jwt\_token</code></td><td style={{width:'210px'}}><code>DAYTONA\_JWT\_TOKEN</code></td><td>JWT authentication token. JWT authentication also requires <code>organization\_id</code>.</td></tr>
      <tr><td style={{width:'230px'}}><code>organization\_id</code></td><td style={{width:'210px'}}><code>DAYTONA\_ORGANIZATION\_ID</code></td><td>Organization ID used for JWT authentication.</td></tr>
      <tr><td style={{width:'230px'}}><code>connection\_pool\_maxsize</code></td><td style={{width:'210px'}}><code>250</code></td><td>Maximum simultaneous HTTP connections opened by the Daytona SDK. It must be a positive integer; set JSON <code>null</code> to remove the cap.</td></tr>
    </tbody>
  </table>
</div>

Authentication requires either `api_key`, or both `jwt_token` and `organization_id`.

### Image and Startup

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'760px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'230px'}}>Field</th><th style={{width:'130px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'230px'}}><code>image</code></td><td style={{width:'130px'}}>Unset</td><td>Registry image name, such as <code>python:3.12</code>. Daytona creates the sandbox from this image, and this is the only startup path to which <code>resources</code> applies.</td></tr>
      <tr><td style={{width:'230px'}}><code>snapshot</code></td><td style={{width:'130px'}}>Unset</td><td>Name of an Active Daytona snapshot in the current organization. The snapshot determines the resource shape; AgentCompass does not send <code>resources</code>.</td></tr>
      <tr><td style={{width:'230px'}}><code>dockerfile</code></td><td style={{width:'130px'}}>Unset</td><td>Reserved field; the current implementation rejects it. Build and publish the image first, then set <code>image</code>.</td></tr>
      <tr><td style={{width:'230px'}}><code>compose\_file</code></td><td style={{width:'130px'}}>Unset</td><td>Reserved field; the current implementation does not support Docker Compose / DinD startup.</td></tr>
      <tr><td style={{width:'230px'}}><code>language</code></td><td style={{width:'130px'}}><code>python</code></td><td>Daytona code-execution language: <code>python</code>, <code>typescript</code>, or <code>javascript</code>. It selects the default snapshot when no startup source is set; a custom image must still contain the task runtime.</td></tr>
      <tr><td style={{width:'230px'}}><code>os\_user</code></td><td style={{width:'130px'}}>Daytona default</td><td>OS user for commands in the sandbox. It must exist in the image or snapshot; when unset, that source supplies its default user.</td></tr>
    </tbody>
  </table>
</div>

Set at most one of `image`, `snapshot`, `dockerfile`, and `compose_file`; the only usable startup sources today are `image` and `snapshot`. If neither is set, Daytona uses the default snapshot for `language`. A Benchmark that requires a prebuilt task environment still needs a compatible `image` or `snapshot` from a recipe or explicit parameters.

### Identity and Metadata

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'760px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'220px'}}>Field</th><th style={{width:'100px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'220px'}}><code>name</code></td><td style={{width:'100px'}}>Generated</td><td>Sandbox name. A fixed name can conflict during concurrent creation or while a previous sandbox still exists.</td></tr>
      <tr><td style={{width:'220px'}}><code>labels</code></td><td style={{width:'100px'}}><code>\{}</code></td><td>String key-value mapping written at creation time, such as <code>\{"batch":"nightly"}</code>, for metadata such as ownership or evaluation batch.</td></tr>
    </tbody>
  </table>
</div>

### Workspace and Environment Variables

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'760px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'230px'}}>Field</th><th style={{width:'130px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'230px'}}><code>default\_workspace\_root</code></td><td style={{width:'130px'}}><code>workspace/</code></td><td>Default path used by the Harness when the Benchmark supplies no task working directory. AgentCompass ensures that it exists after creation.</td></tr>
      <tr><td style={{width:'230px'}}><code>env\_variables</code></td><td style={{width:'130px'}}><code>\{}</code></td><td>Environment-variable mapping, such as <code>\{"DEBUG":"1"}</code>. Names must match <code>\[A-Za-z\_]\[A-Za-z0-9\_]\*</code>; values are converted to strings, passed at sandbox creation, and merged into later command environments.</td></tr>
    </tbody>
  </table>
</div>

### Resources

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'760px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'230px'}}>Field</th><th style={{width:'150px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'230px'}}><code>resources</code></td><td style={{width:'150px'}}><code>\{}</code></td><td>Daytona resource object, sent only when the sandbox is created from <code>image</code>. Its supported child fields are listed below.</td></tr>
      <tr><td style={{width:'230px'}}><code>resources.cpu</code></td><td style={{width:'150px'}}><code>1</code> vCPU</td><td>Requested vCPU count as a positive integer. Alias: <code>resources.cpus</code>. The organization configuration determines the available maximum.</td></tr>
      <tr><td style={{width:'230px'}}><code>resources.memory</code></td><td style={{width:'150px'}}><code>1</code> GiB</td><td>Requested memory in GiB as a positive integer. The organization configuration determines the available maximum.</td></tr>
      <tr><td style={{width:'230px'}}><code>resources.disk</code></td><td style={{width:'150px'}}><code>3</code> GiB</td><td>Requested disk space in GiB as a positive integer. Alias: <code>resources.storage</code>. The organization configuration determines the available maximum.</td></tr>
      <tr><td style={{width:'230px'}}><code>resources.gpu</code></td><td style={{width:'150px'}}>Unset</td><td>Requests a GPU. Daytona currently supports at most one GPU per sandbox, so set this to <code>1</code>. Also set <code>ephemeral=true</code> or <code>auto\_delete\_interval=0</code>. Alias: <code>resources.gpus</code>. The current adapter does not support <code>gpu\_type</code>, so it cannot select a GPU model.</td></tr>
    </tbody>
  </table>
</div>

Prefer the canonical fields in the table, and do not set a field together with its alias. The current adapter does not send other `resources` keys to Daytona. Values must also fit the organization's per-sandbox limits; use the Daytona Dashboard and current official documentation as the source of truth for those limits.

### Network

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'720px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'220px'}}>Field</th><th style={{width:'100px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'220px'}}><code>network\_block\_all</code></td><td style={{width:'100px'}}>Unset</td><td>Daytona-native outbound-firewall switch. <code>true</code> blocks all outbound access; <code>false</code> disables sandbox-level block-all but cannot override organization policy.</td></tr>
      <tr><td style={{width:'220px'}}><code>network\_allow\_list</code></td><td style={{width:'100px'}}><code>\[]</code></td><td>Array of allowed external IPv4 addresses or CIDRs, such as <code>\["203.0.113.10","10.0.0.0/8"]</code>. Other external IP destinations are blocked. Bare IPv4 addresses become <code>/32</code>; the maximum is 10 entries, and IPv6 is unsupported.</td></tr>
      <tr><td style={{width:'220px'}}><code>domain\_allow\_list</code></td><td style={{width:'100px'}}><code>\[]</code></td><td>Array of allowed external domains, such as <code>\["api.example.com","\*.example.org"]</code>. Other external domains are blocked. The maximum is 20 entries; do not include schemes, ports, or paths.</td></tr>
    </tbody>
  </table>
</div>

Enable only one restriction method: `network_allow_list` and `domain_allow_list` cannot both be non-empty, and `network_block_all=true` cannot be combined with either list. These fields affect initial creation only when the Environment's shared baseline policy is `public`. To keep setup, agent execution, and verification rules consistent, prefer [shared network policies](/en/user_guide/modules/environments/configuration/network) and do not configure both approaches.

Daytona's organization policy always takes precedence over sandbox settings. Under Daytona's current tier rules, Tier 1 and Tier 2 cannot override organization restrictions at the sandbox level; Tier 3 and Tier 4 can customize or update them dynamically. Phase transitions also require credentials with write permission and an installed SDK that provides `update_network_settings`.

### Lifecycle and Timeouts

<div style={{overflowX:'auto'}}>
  <table style={{width:'100%', minWidth:'760px', tableLayout:'fixed'}}>
    <thead>
      <tr><th style={{width:'220px'}}>Field</th><th style={{width:'100px'}}>Default</th><th>Meaning</th></tr>
    </thead>

    <tbody>
      <tr><td style={{width:'220px'}}><code>auto\_stop\_interval</code></td><td style={{width:'100px'}}><code>15</code></td><td>Non-negative integer minutes without Daytona activity before a running sandbox is stopped; <code>0</code> disables auto-stop. An internal background process alone may not refresh the timer.</td></tr>
      <tr><td style={{width:'220px'}}><code>auto\_archive\_interval</code></td><td style={{width:'100px'}}>Unset</td><td>Non-negative integer minutes continuously stopped before automatic archive. When unset, Daytona uses its default (currently 7 days for container sandboxes); <code>0</code> uses the current 30-day maximum. Container sandboxes only.</td></tr>
      <tr><td style={{width:'220px'}}><code>auto\_delete\_interval</code></td><td style={{width:'100px'}}>Unset</td><td>Minutes continuously stopped before automatic deletion. Unset disables it; <code>0</code> deletes immediately on stop. AgentCompass accepts non-negative integers only.</td></tr>
      <tr><td style={{width:'220px'}}><code>ephemeral</code></td><td style={{width:'100px'}}><code>false</code></td><td>When <code>true</code>, Daytona sets <code>auto\_delete\_interval</code> to <code>0</code>, so the sandbox is deleted as soon as it stops; <code>auto\_archive\_interval</code> therefore has no effect.</td></tr>
      <tr><td style={{width:'220px'}}><code>delete\_on\_close</code></td><td style={{width:'100px'}}><code>true</code></td><td>AgentCompass-only close behavior: <code>true</code> calls Daytona delete; <code>false</code> calls stop instead.</td></tr>
      <tr><td style={{width:'220px'}}><code>sandbox\_start\_timeout</code></td><td style={{width:'100px'}}><code>60</code></td><td>Positive seconds to wait for Daytona to create and start the sandbox. In AgentCompass, <code>0</code> does not mean unlimited; it falls back to 60 seconds.</td></tr>
      <tr><td style={{width:'220px'}}><code>operation\_timeout</code></td><td style={{width:'100px'}}><code>1800</code></td><td>Positive integer seconds used when a command, file operation, or network update has no more specific timeout.</td></tr>
    </tbody>
  </table>
</div>

`delete_on_close=false` differs from `--keep-environment`: the former still performs normal close but calls Daytona stop. If `ephemeral=true` or `auto_delete_interval=0`, Daytona still deletes the sandbox when it stops. The latter skips this AgentCompass close, but it does not bypass Daytona auto-stop, archive, or deletion rules. See [Run Controls](/en/user_guide/using_agentcompass/run_controls).

## Parameter Sources

* Run `agentcompass config docs env daytona` to see the fields, types, and defaults supported by the installed version.
* [Daytona Async Python SDK: client configuration and create parameters](https://www.daytona.io/docs/en/python-sdk/async/async-daytona/)
* [Daytona Async Python SDK: Resources type](https://www.daytona.io/docs/en/python-sdk/async/async-sandbox/#resources)
* [Daytona Sandboxes: resources, ephemeral sandboxes, and lifecycle](https://www.daytona.io/docs/en/sandboxes/)
* [Daytona Snapshots](https://www.daytona.io/docs/en/snapshots/)
* [Daytona Network Limits](https://www.daytona.io/docs/en/network-limits/)

Use that command as the source of truth for fields, types, and defaults supported by the installed adapter. Use the upstream documentation and the connected service version for Daytona-native values and platform behavior.

## Provider-Specific Behavior

* When a snapshot is used, resources come from the snapshot or Daytona configuration; `resources` is not applied.
* If a benchmark requires a prebuilt task image and neither a recipe nor explicit parameters supply `image` or `snapshot`, AgentCompass fails before creation.
* Phase network transitions depend on the installed Daytona SDK. AgentCompass reports a clear error when that SDK cannot update network settings dynamically.

## Troubleshooting

| Symptom                           | What to check                                                                                                                         |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication fails              | Check that the API key is valid, can manage sandboxes, and belongs to the same deployment as `api_url` and `target`.                  |
| Startup sources conflict          | Set only one of `image`, `snapshot`, `dockerfile`, and `compose_file`.                                                                |
| Dockerfile or Compose is rejected | Build and publish a registry image for `image`, or create a Daytona snapshot.                                                         |
| Sandbox startup times out         | Confirm that the selected target can use the image or snapshot, then increase `sandbox_start_timeout` based on observed startup time. |
| Resource settings have no effect  | If using `snapshot`, configure resources in Daytona; `resources` applies only when creating from `image`.                             |

## Related Pages

* [Environments Overview](/en/user_guide/modules/environments/overview)
* [Configure an Environment](/en/user_guide/modules/environments/configuration/overview)
* [Resource Limits](/en/user_guide/modules/environments/configuration/resource_limits)
* [CLI Configuration Files](/en/user_guide/using_agentcompass/cli/config)
