---
description: Connect a Flue agent to an application-owned Daytona sandbox.
---

# Daytona

Last updated May 30, 2026 [ View as Markdown](https://flueframework.com/docs/ecosystem/sandboxes/daytona/index.md) 

The Daytona connector adapts an already-initialized Daytona sandbox from `@daytona/sdk` into Flue’s `SandboxFactory` interface. Use it when a Node-hosted application needs a provider-managed sandbox with filesystem and shell operations.

## Add the connector

```
pnpm exec flue add daytona
```

The repository includes a runnable integration shape in `examples/hello-world/.flue/connectors/daytona.ts`.

## Requirements

| Requirement         | Value                                                                        |
| ------------------- | ---------------------------------------------------------------------------- |
| Provider package    | @daytona/sdk                                                                 |
| Credential          | DAYTONA\_API\_KEY                                                            |
| Integration shape   | Your code creates a Daytona sandbox, then passes it through daytona(sandbox) |
| Lifecycle ownership | Your application owns creation, retention, and deletion                      |

## Typical use

```
import { Daytona } from '@daytona/sdk';
import { createAgent } from '@flue/runtime';
import { daytona } from '../connectors/daytona';

const client = new Daytona({ apiKey: env.DAYTONA_API_KEY });
const sandbox = await client.create();
const agent = createAgent(() => ({
  model: 'anthropic/claude-sonnet-4-6',
  sandbox: daytona(sandbox),
  cwd: '/workspace',
}));
```

Delete an ephemeral sandbox in application code after bounded work completes. If a continuing agent instance should reuse a remote workspace, map instance identity to sandbox identity and implement retention and cleanup deliberately.

See [Sandboxes](https://flueframework.com/docs/guide/sandboxes/#remote-sandboxes) and [Sandbox Connector API](https://github.com/withastro/flue/blob/main/docs/sandbox-connector-spec.md).

## Docs Navigation

Current page: [Daytona](https://flueframework.com/docs/ecosystem/sandboxes/daytona/)

### Sections

* [Guide](https://flueframework.com/docs/getting-started/quickstart/)
* [Reference](https://flueframework.com/docs/api/agent-api/)
* [CLI](https://flueframework.com/docs/cli/overview/)
* [SDK](https://flueframework.com/docs/sdk/overview/)
* [Ecosystem](https://flueframework.com/docs/ecosystem/overview/)

### Ecosystem

* [ Overview ](https://flueframework.com/docs/ecosystem/overview/)

### Deployment

* [ Cloudflare ](https://flueframework.com/docs/ecosystem/deploy/cloudflare/)
* [ GitHub Actions ](https://flueframework.com/docs/ecosystem/deploy/github-actions/)
* [ GitLab CI/CD ](https://flueframework.com/docs/ecosystem/deploy/gitlab-ci/)
* [ Node.js ](https://flueframework.com/docs/ecosystem/deploy/node/)
* [ Render ](https://flueframework.com/docs/ecosystem/deploy/render/)

### Sandboxes

* [ boxd ](https://flueframework.com/docs/ecosystem/sandboxes/boxd/)
* [ Cloudflare Shell ](https://flueframework.com/docs/ecosystem/sandboxes/cloudflare-shell/)
* [ Cloudflare Sandbox ](https://flueframework.com/docs/ecosystem/sandboxes/cloudflare/)
* [ Daytona ](https://flueframework.com/docs/ecosystem/sandboxes/daytona/)
* [ E2B ](https://flueframework.com/docs/ecosystem/sandboxes/e2b/)
* [ exe.dev ](https://flueframework.com/docs/ecosystem/sandboxes/exedev/)
* [ islo ](https://flueframework.com/docs/ecosystem/sandboxes/islo/)
* [ Mirage ](https://flueframework.com/docs/ecosystem/sandboxes/mirage/)
* [ Modal ](https://flueframework.com/docs/ecosystem/sandboxes/modal/)
* [ smolvm ](https://flueframework.com/docs/ecosystem/sandboxes/smolvm/)
* [ Superserve ](https://flueframework.com/docs/ecosystem/sandboxes/superserve/)
* [ Vercel Sandbox ](https://flueframework.com/docs/ecosystem/sandboxes/vercel/)