daytona

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

What is Daytona

什么是Daytona

Daytona provides full composable computerssandboxes — for AI agents. Each sandbox is an isolated runtime environment with its own kernel, filesystem, network stack, and dedicated vCPU, RAM, and disk. Agents can install packages, run servers, compile code, and manage processes inside sandboxes.
Sandboxes are built from OCI-compliant images or snapshots. Any language or tool that runs on Linux works.
Scope: This skill covers Daytona Cloud (
app.daytona.io
). For self-hosted Daytona OSS deployment, see
./references/platform/oss-deployment.md
.
Daytona为AI Agent提供完全可组合的计算环境——即沙箱。每个沙箱都是一个隔离的运行时环境,拥有独立的内核、文件系统、网络栈以及专属的vCPU、内存和磁盘。Agent可以在沙箱内安装包、运行服务器、编译代码和管理进程。
沙箱基于OCI兼容的镜像或快照构建。任何可在Linux上运行的语言或工具都能在其中使用。
适用范围:本技能覆盖Daytona云端(
app.daytona.io
)。如需自建Daytona OSS部署,请查看
./references/platform/oss-deployment.md

Before You Start

开始之前

Before writing any Daytona code, verify setup:
  1. SDK installed? Check that the Daytona SDK is installed for the user's language (e.g.
    pip show daytona
    or check
    package.json
    for
    @daytonaio/sdk
    ). If not, install it.
  2. API key set? Check
    DAYTONA_API_KEY
    in the shell environment or in environment files. If not set, tell the user they need an API key and point them to Daytona Dashboard > API Keys to create one.
在编写任何Daytona代码前,请确认以下配置已完成:
  1. SDK已安装? 检查用户使用的语言是否已安装Daytona SDK(例如,执行
    pip show daytona
    或查看
    package.json
    中的
    @daytonaio/sdk
    )。若未安装,请指导用户完成安装。
  2. API密钥已设置? 检查Shell环境或环境文件中的
    DAYTONA_API_KEY
    。若未设置,请告知用户需要API密钥,并引导其前往Daytona控制台 > API密钥创建。

SDK Essentials — Python

SDK核心用法 — Python

Installation

安装

bash
pip install daytona
bash
pip install daytona

Create client and sandbox

创建客户端与沙箱

python
from daytona import Daytona
python
from daytona import Daytona

Uses DAYTONA_API_KEY env var

使用DAYTONA_API_KEY环境变量

daytona = Daytona()
daytona = Daytona()

Create a sandbox with defaults (1 vCPU, 1GB RAM, 3GB disk)

使用默认配置创建沙箱(1核vCPU、1GB内存、3GB磁盘)

sandbox = daytona.create()

```python
from daytona import Daytona, CreateSandboxFromImageParams, Image, Resources

daytona = Daytona()
sandbox = daytona.create()

```python
from daytona import Daytona, CreateSandboxFromImageParams, Image, Resources

daytona = Daytona()

Create with a custom image, name, and resources

使用自定义镜像、名称和资源配置创建沙箱

sandbox = daytona.create(CreateSandboxFromImageParams( image=Image.debian_slim("3.12"), name="my-sandbox", resources=Resources(cpu=2, memory=4, disk=8), ))
undefined
sandbox = daytona.create(CreateSandboxFromImageParams( image=Image.debian_slim("3.12"), name="my-sandbox", resources=Resources(cpu=2, memory=4, disk=8), ))
undefined

Execute commands

执行命令

Both
exec
and
code_run
return an
ExecuteResponse
with
.result
(stdout) and
.exit_code
.
code_run
executes in the sandbox's language runtime (set at creation via
language=
param, defaults to
"python"
). Supported:
python
,
typescript
,
javascript
.
python
undefined
exec
code_run
都会返回包含
.result
(标准输出)和
.exit_code
(退出码)的
ExecuteResponse
对象。
code_run
会在沙箱的语言运行时中执行代码(创建沙箱时可通过
language=
参数指定,默认值为
"python"
)。支持的语言包括:
python
typescript
javascript
python
undefined

Run a shell command

运行Shell命令

response = sandbox.process.exec("echo 'Hello, World!'") print(response.result) # "Hello, World!" print(response.exit_code) # 0
response = sandbox.process.exec("echo 'Hello, World!'") print(response.result) # "Hello, World!" print(response.exit_code) # 0

Run Python code (stateless)

运行Python代码(无状态)

response = sandbox.process.code_run(''' import json data = {"key": "value"} print(json.dumps(data, indent=2)) ''') print(response.result) print(response.exit_code) # 0 on success, non-zero on error
undefined
response = sandbox.process.code_run(''' import json data = {"key": "value"} print(json.dumps(data, indent=2)) ''') print(response.result) print(response.exit_code) # 成功时为0,出错时为非零值
undefined

File operations

文件操作

python
undefined
python
undefined

Write a file

写入文件

sandbox.fs.upload_file(b"Hello, Daytona!", "/home/daytona/data.txt")
sandbox.fs.upload_file(b"Hello, Daytona!", "/home/daytona/data.txt")

Read a file

读取文件

content = sandbox.fs.download_file("/home/daytona/data.txt") print(content.decode())
content = sandbox.fs.download_file("/home/daytona/data.txt") print(content.decode())

List files

列出文件

files = sandbox.fs.list_files("workspace") for f in files: print(f"{f.name} ({'dir' if f.is_dir else f.size})")
undefined
files = sandbox.fs.list_files("workspace") for f in files: print(f"{f.name} ({'目录' if f.is_dir else f.size}字节)")
undefined

Sandbox lifecycle

沙箱生命周期管理

python
undefined
python
undefined

Pause and resume later

暂停沙箱,后续可恢复

sandbox.stop() # frees CPU/RAM, keeps disk sandbox.start() # ready to use again
sandbox.stop() # 释放CPU/内存,保留磁盘数据 sandbox.start() # 恢复使用

Long-term storage (must be stopped first)

长期存储(需先暂停沙箱)

sandbox.stop() sandbox.archive() # cold storage, no quota impact
sandbox.stop() sandbox.archive() # 冷存储,不占用配额

Resume a previous sandbox by ID or name

通过ID或名称恢复已有的沙箱

sandbox = daytona.get("sandbox-id-or-name") sandbox.start()
sandbox = daytona.get("sandbox-id-or-name") sandbox.start()

Permanently remove

永久删除沙箱

sandbox.delete()

Wrap Daytona calls with `DaytonaError` for error handling. For async, use `AsyncDaytona` (async context manager). For full Python SDK reference, see [python-sdk/README.md](./references/python-sdk/README.md).
sandbox.delete()

请使用`DaytonaError`包裹Daytona调用以处理错误。如需异步操作,请使用`AsyncDaytona`(异步上下文管理器)。完整Python SDK参考请查看[python-sdk/README.md](./references/python-sdk/README.md)。

SDK Essentials — TypeScript

SDK核心用法 — TypeScript

The TypeScript SDK (
@daytonaio/sdk
) mirrors the Python API. Key differences:
executeCommand
instead of
exec
,
codeRun
instead of
code_run
,
uploadFile
/
downloadFile
/
listFiles
for file ops,
DaytonaError
for error handling. Install with
npm install @daytonaio/sdk
.
For full TypeScript SDK reference and examples, see typescript-sdk/README.md.
TypeScript SDK(
@daytonaio/sdk
)与Python API结构一致。主要区别在于:使用
executeCommand
替代
exec
codeRun
替代
code_run
,文件操作用
uploadFile
/
downloadFile
/
listFiles
,错误处理使用
DaytonaError
。安装命令为
npm install @daytonaio/sdk
完整TypeScript SDK参考及示例请查看typescript-sdk/README.md

Common Patterns

常见使用模式

Custom environments and snapshots

自定义环境与快照

When the user needs specific packages, tools, or a custom OS in their sandbox, define a custom image with the
Image
builder. If the user will create multiple sandboxes with the same setup, offer to build a snapshot — snapshots bake dependencies into a reusable template so subsequent sandboxes start quickly with everything pre-installed.
Note: Snapshots are built from image definitions, not from live sandbox state. You cannot snapshot a running sandbox to capture its current filesystem.
Define images with the
Image
builder:
python
from daytona import Image
当用户需要在沙箱中使用特定包、工具或自定义操作系统时,可使用
Image
构建器定义自定义镜像。若用户需要创建多个相同配置的沙箱,建议构建快照——快照会将依赖项打包为可复用模板,后续创建沙箱时可快速启动并预装所有依赖。
注意:快照基于镜像定义构建,而非沙箱的实时状态。无法对运行中的沙箱创建快照以捕获当前文件系统状态。
使用
Image
构建器定义镜像:
python
from daytona import Image

Debian with Python packages

安装了Python包的Debian镜像

image = Image.debian_slim("3.12").pip_install(["pandas", "numpy", "scikit-learn"])
image = Image.debian_slim("3.12").pip_install(["pandas", "numpy", "scikit-learn"])

With system packages and shell commands

包含系统包和Shell命令的镜像

image = (Image.debian_slim("3.12") .run_commands("apt-get update && apt-get install -y curl git", "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -") .pip_install(["flask"]) .env({"APP_ENV": "production"}))
image = (Image.debian_slim("3.12") .run_commands("apt-get update && apt-get install -y curl git", "curl -fsSL https://deb.nodesource.com/setup_20.x | bash -") .pip_install(["flask"]) .env({"APP_ENV": "production"}))

From a Dockerfile

基于Dockerfile构建镜像

image = Image.from_dockerfile("./Dockerfile")
image = Image.from_dockerfile("./Dockerfile")

From a registry image directly

直接使用镜像仓库中的镜像

image = Image.base("node:20-slim")

```typescript
import { Image } from '@daytonaio/sdk'

const image = Image.debianSlim('3.12').pipInstall(['pandas', 'numpy', 'scikit-learn'])

const image = Image.debianSlim('3.12')
    .runCommands('apt-get update && apt-get install -y curl git',
                 'curl -fsSL https://deb.nodesource.com/setup_20.x | bash -')
    .pipInstall(['flask'])
    .env({ APP_ENV: 'production' })

const image = Image.fromDockerfile('./Dockerfile')

const image = Image.base('node:20-slim')
Create a one-off sandbox directly from an image:
python
from daytona import Daytona, CreateSandboxFromImageParams, Image

daytona = Daytona()
image = Image.debian_slim("3.12").pip_install(["flask"])
sandbox = daytona.create(CreateSandboxFromImageParams(image=image))
typescript
const sandbox = await daytona.create({ image })
Or build a snapshot for reuse (recommended if creating multiple sandboxes with the same setup):
python
from daytona import Daytona, CreateSandboxFromSnapshotParams, CreateSnapshotParams, Image

daytona = Daytona()
image = Image.base("node:20-slim")

```typescript
import { Image } from '@daytonaio/sdk'

const image = Image.debianSlim('3.12').pipInstall(['pandas', 'numpy', 'scikit-learn'])

const image = Image.debianSlim('3.12')
    .runCommands('apt-get update && apt-get install -y curl git',
                 'curl -fsSL https://deb.nodesource.com/setup_20.x | bash -')
    .pipInstall(['flask'])
    .env({ APP_ENV: 'production' })

const image = Image.fromDockerfile('./Dockerfile')

const image = Image.base('node:20-slim')
直接基于镜像创建一次性沙箱:
python
from daytona import Daytona, CreateSandboxFromImageParams, Image

daytona = Daytona()
image = Image.debian_slim("3.12").pip_install(["flask"])
sandbox = daytona.create(CreateSandboxFromImageParams(image=image))
typescript
const sandbox = await daytona.create({ image })
或构建快照用于复用(若需创建多个相同配置的沙箱,推荐此方式):
python
from daytona import Daytona, CreateSandboxFromSnapshotParams, CreateSnapshotParams, Image

daytona = Daytona()

One-time: build a snapshot

一次性操作:构建快照

image = Image.debian_slim("3.12").pip_install(["pandas", "numpy", "scikit-learn"]) snapshot = daytona.snapshot.create(CreateSnapshotParams( name="data-science", image=image, ))
image = Image.debian_slim("3.12").pip_install(["pandas", "numpy", "scikit-learn"]) snapshot = daytona.snapshot.create(CreateSnapshotParams( name="data-science", image=image, ))

Every time after: fast start from snapshot

后续操作:从快照快速启动沙箱

sandbox = daytona.create(CreateSandboxFromSnapshotParams( snapshot=snapshot.name, )) response = sandbox.process.code_run("import pandas; print(pandas.version)")

```typescript
const snapshot = await daytona.snapshot.create({
    name: 'data-science',
    image: Image.debianSlim('3.12').pipInstall(['pandas', 'numpy', 'scikit-learn']),
})

const sandbox = await daytona.create({ snapshot: snapshot.name })
For the full
Image
builder API, see
./references/<lang>-sdk/declarative-builder.md
. For snapshot management, see
./references/<lang>-sdk/snapshots.md
.
sandbox = daytona.create(CreateSandboxFromSnapshotParams( snapshot=snapshot.name, )) response = sandbox.process.code_run("import pandas; print(pandas.version)")

```typescript
const snapshot = await daytona.snapshot.create({
    name: 'data-science',
    image: Image.debianSlim('3.12').pipInstall(['pandas', 'numpy', 'scikit-learn']),
})

const sandbox = await daytona.create({ snapshot: snapshot.name })
完整
Image
构建器API请查看
./references/<lang>-sdk/declarative-builder.md
。快照管理相关内容请查看
./references/<lang>-sdk/snapshots.md

Long-running task pattern

长期运行任务模式

python
from daytona import Daytona

daytona = Daytona()
sandbox = daytona.create()
python
from daytona import Daytona

daytona = Daytona()
sandbox = daytona.create()

... clone repo, install deps, etc.

... 克隆仓库、安装依赖等操作 ...

Start a test suite in the background

在后台启动测试套件

sandbox.process.exec("nohup pytest --tb=short > /home/daytona/test.log 2>&1 &")
sandbox.process.exec("nohup pytest --tb=short > /home/daytona/test.log 2>&1 &")

Check progress later

后续检查进度

response = sandbox.process.exec("tail -5 /home/daytona/test.log") print(response.result)
response = sandbox.process.exec("tail -5 /home/daytona/test.log") print(response.result)

Download the full report when done

任务完成后下载完整报告

report = sandbox.fs.download_file("/home/daytona/test.log")
undefined
report = sandbox.fs.download_file("/home/daytona/test.log")
undefined

Preview URLs

预览URL

Sandboxes expose HTTP services via preview URLs. Previews are token-authenticated by default, or public if
public=True
(Python) /
public: true
(TypeScript) at sandbox creation.
  • Token-authenticated — returns
    .url
    and
    .token
    (send as
    x-daytona-preview-token
    header)
    • Python:
      sandbox.get_preview_link(port)
      | TypeScript:
      sandbox.getPreviewLink(port)
      | Go:
      sandbox.GetPreviewLink(port)
      | Ruby:
      sandbox.get_preview_link(port)
  • Signed URL (shareable) — token embedded in URL, no headers needed
    • Python:
      sandbox.create_signed_preview_url(port, expires_in_seconds=3600)
      | TypeScript:
      sandbox.getSignedPreviewUrl(port, 3600)
      | Go:
      sandbox.GetSignedPreviewLink(port, 3600)
      | Ruby:
      sandbox.create_signed_preview_url(port, expires_in_seconds: 3600)
For details, see
./references/<lang>-sdk/preview.md
.
沙箱可通过预览URL暴露HTTP服务。默认情况下预览URL为令牌认证模式,若创建沙箱时设置
public=True
(Python)或
public: true
(TypeScript),则为公开模式。
  • 令牌认证模式 — 返回
    .url
    .token
    (需在请求头中携带
    x-daytona-preview-token
    • Python:
      sandbox.get_preview_link(port)
      | TypeScript:
      sandbox.getPreviewLink(port)
      | Go:
      sandbox.GetPreviewLink(port)
      | Ruby:
      sandbox.get_preview_link(port)
  • 可分享签名URL — 令牌嵌入URL中,无需携带请求头
    • Python:
      sandbox.create_signed_preview_url(port, expires_in_seconds=3600)
      | TypeScript:
      sandbox.getSignedPreviewUrl(port, 3600)
      | Go:
      sandbox.GetSignedPreviewLink(port, 3600)
      | Ruby:
      sandbox.create_signed_preview_url(port, expires_in_seconds: 3600)
详细说明请查看
./references/<lang>-sdk/preview.md

Sandbox Limits & Constraints

沙箱限制与约束

ConstraintDefaultMaximum
vCPU per sandbox14
RAM per sandbox1 GB8 GB
Disk per sandbox3 GiB10 GB
Aggregate limits (total vCPU/RAM/disk across all sandboxes) depend on your organization tier:
TiervCPURAMStorageRequirements
Tier 11010 GiB30 GiBEmail verified
Tier 2100200 GiB300 GiBCredit card + $25 top-up + GitHub connected
Tier 3250500 GiB2000 GiBBusiness email + $500 top-up
Tier 45001000 GiB5000 GiB$2000 top-up every 30 days
Resource state impact:
  • Running sandboxes count against vCPU + RAM + disk
  • Stopped sandboxes count only against disk
  • Archived sandboxes have no quota impact (data in cold storage)
约束项默认值最大值
单沙箱vCPU数量14
单沙箱内存1 GB8 GB
单沙箱磁盘容量3 GiB10 GB
总资源限制(所有沙箱的vCPU/内存/磁盘总和)取决于您的组织等级:
等级vCPU总数内存总数存储总数要求
等级11010 GiB30 GiB邮箱已验证
等级2100200 GiB300 GiB绑定信用卡 + 充值25美元 + 关联GitHub账号
等级3250500 GiB2000 GiB企业邮箱 + 充值500美元
等级45001000 GiB5000 GiB每30天充值2000美元
资源状态影响
  • 运行中的沙箱占用vCPU + 内存 + 磁盘配额
  • 已暂停的沙箱仅占用磁盘配额
  • 已归档的沙箱不占用任何配额(数据存储在冷存储中)

Network access restrictions

网络访问限制

Tier 1 & Tier 2 organizations have restricted network access. Sandboxes can only reach a whitelist of essential services (package registries, Git hosts, AI APIs, CDNs, etc.). This restriction cannot be overridden at the sandbox level — even setting
networkAllowList
won't help if your org is Tier 1/2.
Tier 3 & Tier 4 get full unrestricted internet access by default, with optional per-sandbox firewall controls.
If your code needs to reach arbitrary URLs (external APIs, custom services, etc.), you need Tier 3+. Check your tier at Daytona Dashboard > Limits.
Essential services available on all tiers include: npm/PyPI/apt registries, GitHub/GitLab/Bitbucket, Docker registries, major AI APIs (Anthropic, OpenAI, Google AI, etc.), S3, Google Cloud Storage, and common dev tools (Vercel, Supabase, Clerk, Sentry, etc.). For the full list, see network-limits.md. Missing a service? Submit a request at daytonaio/sandbox-network-whitelist.
View your usage at Daytona Dashboard > Limits. For full details, see limits.md.
等级1和等级2的组织存在网络访问限制。沙箱仅能访问白名单中的核心服务(包注册表、Git托管平台、AI API、CDN等)。此限制无法在沙箱级别覆盖——即使设置
networkAllowList
也无效,除非您的组织升级到等级3或更高。
等级3和等级4默认拥有完全不受限制的互联网访问权限,还可选择为单个沙箱配置防火墙控制。
若您的代码需要访问任意URL(外部API、自定义服务等),则需要等级3或更高。请前往Daytona控制台 > 限制查看您的组织等级。
所有等级均可访问的核心服务包括:npm/PyPI/apt注册表、GitHub/GitLab/Bitbucket、Docker注册表、主流AI API(Anthropic、OpenAI、Google AI等)、S3、Google Cloud Storage以及常用开发工具(Vercel、Supabase、Clerk、Sentry等)。完整列表请查看network-limits.md。若缺少所需服务,请前往daytonaio/sandbox-network-whitelist提交申请。
请前往Daytona控制台 > 限制查看您的资源使用情况。完整限制说明请查看limits.md

Quick Decision Tree

快速决策树

I need to...Start here
Run code/commands in an isolated environmentSDK Essentials above, then
./references/<lang>-sdk/process-code-execution.md
Make sandboxes start faster
./references/<lang>-sdk/snapshots.md
— build a snapshot from an image definition, create new sandboxes from it
Persist data across sandbox runs
./references/<lang>-sdk/volumes.md
— attach persistent storage that survives sandbox deletion
Build a custom environment (specific OS, packages, deps)
./references/<lang>-sdk/declarative-builder.md
— use the
Image
builder to define custom sandbox images
Control what a sandbox can access on the network
./references/<lang>-sdk/network-limits.md
— per-sandbox firewall rules (Tier 3+ for unrestricted)
Interact with a browser or GUI in the sandbox
./references/<lang>-sdk/computer-use-guide.md
+
./references/<lang>-sdk/vnc-access.md
Run a stateful Python interpreter (persistent variables between calls)
./references/python-sdk/sync/code-interpreter.md
or
./references/typescript-sdk/code-interpreter.md
Store and retrieve objects (S3-compatible)
./references/<lang>-sdk/object-storage.md
(Python sync/async, TypeScript, Ruby)
SSH into a running sandbox
./references/<lang>-sdk/ssh-access.md
Replace
<lang>-sdk
with:
python-sdk
,
typescript-sdk
,
go-sdk
, or
ruby-sdk
.
我需要...从这里开始
在隔离环境中运行代码/命令上述SDK核心用法,然后查看
./references/<lang>-sdk/process-code-execution.md
让沙箱启动更快
./references/<lang>-sdk/snapshots.md
— 基于镜像定义构建快照,通过快照创建新沙箱
在沙箱运行之间持久化数据
./references/<lang>-sdk/volumes.md
— 挂载可在沙箱删除后保留的持久化存储
构建自定义环境(特定操作系统、包、依赖)
./references/<lang>-sdk/declarative-builder.md
— 使用
Image
构建器定义自定义沙箱镜像
控制沙箱可访问的网络资源
./references/<lang>-sdk/network-limits.md
— 单沙箱防火墙规则(等级3及以上支持无限制访问)
在沙箱中与浏览器或GUI交互
./references/<lang>-sdk/computer-use-guide.md
+
./references/<lang>-sdk/vnc-access.md
运行有状态的Python解释器(调用之间保留变量)
./references/python-sdk/sync/code-interpreter.md
./references/typescript-sdk/code-interpreter.md
存储和检索对象(兼容S3)
./references/<lang>-sdk/object-storage.md
(支持Python同步/异步、TypeScript、Ruby)
SSH连接到运行中的沙箱
./references/<lang>-sdk/ssh-access.md
请将
<lang>-sdk
替换为:
python-sdk
typescript-sdk
go-sdk
ruby-sdk

SDK Index

SDK索引

Python SDK (primary)

Python SDK(主要)

FileDescription
python-sdk/README.mdInstallation, quickstart, configuration
python-sdk/sync/daytona.mdDaytona client — create, list, delete sandboxes
python-sdk/sync/sandbox.mdSandbox instance — lifecycle, resources, labels
python-sdk/sync/process.mdExecute commands, run code
python-sdk/sync/file-system.mdFile operations — read, write, upload, download
python-sdk/sync/git.mdGit operations — clone, commit, push, status
python-sdk/sync/snapshot.mdSnapshot management
python-sdk/sync/volume.mdVolume management
python-sdk/sync/code-interpreter.mdStateful Python interpreter
python-sdk/sync/computer-use.mdDesktop automation (mouse/keyboard/screen)
python-sdk/sync/lsp-server.mdLanguage Server Protocol
python-sdk/sync/object-storage.mdS3-compatible object storage
python-sdk/errors.mdError types
python-sdk/image.mdCustom image definitions
Async versions mirror the sync API: python-sdk/async/.
文件描述
python-sdk/README.md安装、快速开始、配置
python-sdk/sync/daytona.mdDaytona客户端 — 创建、列出、删除沙箱
python-sdk/sync/sandbox.md沙箱实例 — 生命周期、资源、标签
python-sdk/sync/process.md执行命令、运行代码
python-sdk/sync/file-system.md文件操作 — 读取、写入、上传、下载
python-sdk/sync/git.mdGit操作 — 克隆、提交、推送、状态查询
python-sdk/sync/snapshot.md快照管理
python-sdk/sync/volume.md存储卷管理
python-sdk/sync/code-interpreter.md有状态Python解释器
python-sdk/sync/computer-use.md桌面自动化(鼠标/键盘/屏幕)
python-sdk/sync/lsp-server.md语言服务器协议
python-sdk/sync/object-storage.md兼容S3的对象存储
python-sdk/errors.md错误类型
python-sdk/image.md自定义镜像定义
异步版本与同步API结构一致:python-sdk/async/

TypeScript SDK

TypeScript SDK

Flat structure (no sync/async split like Python): typescript-sdk/README.md. Files:
daytona.md
,
sandbox.md
,
process.md
,
file-system.md
,
git.md
,
snapshot.md
,
volume.md
,
code-interpreter.md
,
computer-use.md
,
lsp-server.md
,
object-storage.md
,
execute-response.md
,
pty-handle.md
,
errors.md
,
image.md
.
扁平化结构(无Python那样的同步/异步拆分):typescript-sdk/README.md。包含文件:
daytona.md
sandbox.md
process.md
file-system.md
git.md
snapshot.md
volume.md
code-interpreter.md
computer-use.md
lsp-server.md
object-storage.md
execute-response.md
pty-handle.md
errors.md
image.md

Go SDK & Ruby SDK

Go SDK & Ruby SDK

Both follow the same patterns. Go uses a compact single-file structure: go-sdk/README.md. Ruby mirrors TypeScript: ruby-sdk/README.md.
两者遵循相同的模式。Go采用紧凑的单文件结构:go-sdk/README.md。Ruby与TypeScript结构类似:ruby-sdk/README.md

Feature Guides (per-SDK)

功能指南(按SDK分类)

Each SDK folder contains the same set of feature guides with language-specific examples. To find a guide, use
./references/<lang>-sdk/<filename>
(e.g.,
./references/python-sdk/sandboxes.md
,
./references/typescript-sdk/snapshots.md
).
FilenameTopic
sandboxes.md
Sandbox lifecycle — create, start, stop, archive, delete
process-code-execution.md
Run commands and code, stateful interpreter
file-system-operations.md
Read, write, upload, download files
git-operations.md
Clone, commit, push, status
snapshots.md
Build reusable sandbox templates from image definitions
volumes.md
Persistent storage across sandboxes
ssh-access.md
SSH into sandboxes
vnc-access.md
VNC for desktop sandboxes
computer-use-guide.md
Desktop automation (mouse/keyboard/screen)
configuration.md
Environment variables, config precedence
declarative-builder.md
Custom sandbox images with the Image builder
log-streaming.md
Stream sandbox logs
network-limits.md
Network firewall controls
language-server-protocol.md
IDE-like features (autocomplete, diagnostics)
preview.md
Preview URLs for exposed ports
pty.md
PTY/terminal support
regions.md
Available regions
vpn-connections.md
VPN connections
getting-started.md
Quick start guide
每个SDK文件夹都包含一套相同主题的功能指南,并提供对应语言的示例。查找指南时,请使用路径
./references/<lang>-sdk/<filename>
(例如,
./references/python-sdk/sandboxes.md
./references/typescript-sdk/snapshots.md
)。
文件名主题
sandboxes.md
沙箱生命周期 — 创建、启动、暂停、归档、删除
process-code-execution.md
运行命令和代码、有状态解释器
file-system-operations.md
文件读取、写入、上传、下载
git-operations.md
Git克隆、提交、推送、状态查询
snapshots.md
基于镜像定义构建可复用沙箱模板
volumes.md
跨沙箱的持久化存储
ssh-access.md
SSH连接沙箱
vnc-access.md
桌面沙箱的VNC访问
computer-use-guide.md
桌面自动化(鼠标/键盘/屏幕)
configuration.md
环境变量、配置优先级
declarative-builder.md
使用Image构建器创建自定义沙箱镜像
log-streaming.md
沙箱日志流式传输
network-limits.md
网络防火墙控制
language-server-protocol.md
IDE级功能(自动补全、诊断)
preview.md
暴露端口的预览URL
pty.md
PTY/终端支持
regions.md
可用区域
vpn-connections.md
VPN连接
getting-started.md
快速开始指南

Platform Reference

平台参考

FileDescription
limits.mdResource limits, rate limits, tier requirements
organizations.mdTeam management, member roles
billing.mdUsage tracking, pricing
audit-logs.mdAudit logging
linked-accounts.mdGitHub/GitLab account linking
web-terminal.mdBrowser-based terminal access
webhooks.mdWebhook events
mcp.mdMCP integration
runners.mdRunner infrastructure
oss-deployment.mdSelf-hosted deployment
cli.mdCLI command reference
文件描述
limits.md资源限制、速率限制、等级要求
organizations.md团队管理、成员角色
billing.md使用量跟踪、定价
audit-logs.md审计日志
linked-accounts.mdGitHub/GitLab账号关联
web-terminal.md基于浏览器的终端访问
webhooks.mdWebhook事件
mcp.mdMCP集成
runners.md运行器基础设施
oss-deployment.md自建部署
cli.mdCLI命令参考

API Reference

API参考

Raw REST API documentation for all Daytona endpoints (sandboxes, snapshots, volumes, toolbox operations, etc.): api/README.md.
Daytona所有端点(沙箱、快照、存储卷、工具箱操作等)的原始REST API文档:api/README.md