Daytona
Arcade tools designed for LLMs to interact with Daytona sandboxes
Daytona is a sandbox provider; this Arcade toolkit lets LLMs provision and manage isolated sandboxes, run code/commands, manage sessions, snapshots, and integrate with Git and port previews. It streamlines lifecycle, file I/O, automation, and diagnostics for development workflows.
Capabilities
- Full sandbox lifecycle and resource/resizing controls with automation (auto-stop/archive/delete).
- File system and Git operations, plus search/replace and snapshot management.
- Execute code/commands and persistent sessions with logs, ports, SSH and web previews.
- Pagination-aware listing, region selection, and metadata/label management for coordination.
OAuth Provider: GitHub Scopes: None
Secrets
- api_key: DAYTONA_API_KEY (used to authenticate Arcade→Daytona requests; store in env or secret manager).
- Transient SSH access tokens returned by CreateSshAccess are sensitive; avoid logging.
Available tools(46)
| Tool name | Description | Secrets | |
|---|---|---|---|
Archive a stopped sandbox to reduce storage costs.
The sandbox must be stopped first (use stop_sandbox). Can be started again
later, though startup takes longer than from stopped state. | 1 | ||
Configure auto-stop, auto-archive, and/or auto-delete intervals.
Only provided values are updated. WARNING: auto_delete_minutes=0 means
immediate deletion upon stop -- use -1 to disable. | 1 | ||
Create a folder (with parent directories) in the sandbox. | 1 | ||
Create a new isolated sandbox for code execution.
Two creation modes: from a Daytona snapshot or from a Docker image.
If neither snapshot nor image is specified, uses the standard base image.
Resource params (cpu, memory_gb, disk_gb, gpu) only apply to image-based creation.
Returns sandbox name, ID, and status. Ready for run_code / run_command immediately.
Note: A ``region`` parameter is deferred -- the Daytona SDK's
``CreateSandboxFromImageParams`` / ``CreateSandboxFromSnapshotParams`` do not
currently expose a ``target``/``region`` field. | 1 | ||
Create a persistent background session for long-running processes.
Sessions persist across tool calls -- useful for dev servers, watchers, or
multi-step workflows where you need to run commands sequentially. | 1 | ||
Create a new sandbox snapshot (image template).
Snapshots define the base environment for new sandboxes.
The image parameter is required -- it specifies the base Docker image.
Note: snapshot creation can take several minutes as the image must be built. | 1 | ||
Create SSH access credentials for the sandbox.
Returns connection details including host, port, username, and access token
for direct SSH access. Use the token to authenticate SSH connections.
SENSITIVE OUTPUT: The returned token grants SSH access to the sandbox.
Avoid logging or displaying it in contexts where it could be inadvertently
exposed. The token expires after ``expires_in_minutes`` (default 60 min).
Set ``expires_in_minutes=0`` to create a non-expiring token (use with
caution -- increases blast radius from accidental exposure). | 1 | ||
Delete a file or empty directory. Set recursive=True to delete non-empty directories. | 1 | ||
Permanently delete a sandbox and all its contents. | 1 | ||
Search for files by name pattern (glob). Returns matching file paths.
Response includes total count and has_more flag for pagination. | 1 | ||
Get metadata about a file: size, permissions, modified time, type. | 1 | ||
Get a preview URL for a web service running in the sandbox.
Standard URLs require an auth token in the x-daytona-preview-token header.
Signed URLs embed authentication in the URL itself -- useful for sharing. | 1 | ||
Get detailed information about a sandbox.
Returns state, resources, labels, auto-stop/archive settings, and timestamps.
Environment variable values whose keys look secret-like (containing token,
key, secret, password, auth) are redacted by default. Set
include_raw_env_vars=True only when you need the actual values. | 1 | ||
Get output logs from a command running in a session.
Useful for checking output of async commands (servers, builds). | 1 | ||
Get detailed information about a snapshot.
Accepts a snapshot name or ID. Returns full details including state,
image, resources, entrypoint, and timestamps. | 1 | ||
Stage files for the next commit. Accepts file paths or '.' for all changes. | 1 | ||
List all branches. Indicates which branch is currently checked out. | 1 | ||
Switch to a branch, tag, or commit. Optionally create a new branch.
Default mode (create_new_branch=False): switches to an existing ref.
Create mode (create_new_branch=True): creates a new branch named ref
and switches to it, optionally from start_point. | 1 | ||
Clone a Git repository into the sandbox.
For GitHub repos, authentication is handled automatically via Arcade's
OAuth integration — the user is prompted to authorize once, and the
token is managed by Arcade Engine. Consent is one-time; token refresh
is automatic.
Permission requirements by auth mode:
- OAuth Apps mode: the "repo" scope is requested (full repo access).
- GitHub Apps mode: the app installation must have "Contents: read"
permission (for clone/pull) or "Contents: read & write" (for
clone followed by push).
For non-GitHub private repos, provide username + PAT as overrides. | 1 | ||
Commit staged changes. Requires files to be staged first with git_add. | 1 | ||
Create a new branch and switch to it.
Equivalent to git_checkout(ref=branch, create_new_branch=True, start_point=...). | 1 | ||
Delete a local branch. | 1 | ||
Get commit history. Returns commit hash, author, date, and message. | 1 | ||
Pull latest changes from the remote repository.
For GitHub repos, authentication is automatic via OAuth. The SDK path
is used by default. Shell fallback is used only when an explicit
branch is requested.
For non-GitHub remotes, credentials must have been provided during
git_clone or configured manually in the sandbox. | 1 | ||
Push local commits to the remote repository.
For GitHub repos, authentication is automatic via OAuth. The SDK path
is used by default (no token in command args). Shell fallback is used
only when force or explicit branch is requested.
For non-GitHub remotes, credentials must have been provided during
git_clone or configured manually in the sandbox. | 1 |
Selected tools
No tools selected.
Click "Show all tools" to add tools.
Requirements
Select tools to see requirements
Daytona.ArchiveSandbox
Archive a stopped sandbox to reduce storage costs. The sandbox must be stopped first (use stop_sandbox). Can be started again later, though startup takes longer than from stopped state.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
Requirements
Output
json— Updated sandbox info after archivingDaytona.ConfigureSandboxAuto
Configure auto-stop, auto-archive, and/or auto-delete intervals. Only provided values are updated. WARNING: auto_delete_minutes=0 means immediate deletion upon stop -- use -1 to disable.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
auto_stop_minutes | integer | Optional | Auto-stop after N minutes of inactivity. 0 disables auto-stop. Default: unchanged |
auto_archive_minutes | integer | Optional | Auto-archive after N minutes of being stopped. 0 uses the maximum interval. Default: unchanged |
auto_delete_minutes | integer | Optional | Auto-delete after N minutes of being stopped. 0 deletes IMMEDIATELY. Use -1 to disable. Default: unchanged |
Requirements
Output
json— Updated sandbox infoDaytona.CreateFolder
Create a folder (with parent directories) in the sandbox.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Required | Folder path to create |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
mode | string | Optional | Unix permission mode (e.g. '755'). Default: '755' |
Requirements
Output
json— Creation confirmationDaytona.CreateSandbox
Create a new isolated sandbox for code execution. Two creation modes: from a Daytona snapshot or from a Docker image. If neither snapshot nor image is specified, uses the standard base image. Resource params (cpu, memory_gb, disk_gb, gpu) only apply to image-based creation. Returns sandbox name, ID, and status. Ready for run_code / run_command immediately. Note: A ``region`` parameter is deferred -- the Daytona SDK's ``CreateSandboxFromImageParams`` / ``CreateSandboxFromSnapshotParams`` do not currently expose a ``target``/``region`` field.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
name | string | Optional | Human-readable name for the sandbox |
language | string | Optional | Programming language. Default: pythonpythontypescriptjavascript |
snapshot | string | Optional | Daytona snapshot name or ID. Mutually exclusive with image. Default: standard base image |
image | string | Optional | Docker image to create from. Mutually exclusive with snapshot |
env_vars | json | Optional | Environment variables to set in the sandbox. Default: None |
auto_stop_minutes | integer | Optional | Auto-stop after N minutes of inactivity. 0 disables auto-stop. Default: 15 |
cpu | integer | Optional | vCPUs (1-16). Only for image-based creation (ignored for snapshots). Default: 2 |
memory_gb | integer | Optional | RAM in GB (1-64). Only for image-based creation (ignored for snapshots). Default: 4 |
disk_gb | integer | Optional | Disk in GB (1-200). Only for image-based creation (ignored for snapshots). Default: 20 |
gpu | integer | Optional | GPUs (0-8). Only for image-based creation (ignored for snapshots). Default: 0 |
labels | json | Optional | Key-value labels for organization. Default: None |
ephemeral | boolean | Optional | Auto-delete sandbox when it stops. Default: False |
Requirements
Output
json— The created sandbox detailsDaytona.CreateSession
Create a persistent background session for long-running processes. Sessions persist across tool calls -- useful for dev servers, watchers, or multi-step workflows where you need to run commands sequentially.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
session_id | string | Optional | Custom session ID. Auto-generated if omitted |
Requirements
Output
json— Created session detailsDaytona.CreateSnapshot
Create a new sandbox snapshot (image template). Snapshots define the base environment for new sandboxes. The image parameter is required -- it specifies the base Docker image. Note: snapshot creation can take several minutes as the image must be built.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
name | string | Required | Name for the snapshot |
image | string | Required | Base Docker image to build from (required) |
entrypoint | array<string> | Optional | Entrypoint command as a list of strings (e.g. ['python', 'app.py']). Default: None |
resources | json | Optional | Default resources for sandboxes (keys: cpu, memory, disk, gpu). Default: platform defaults |
region_id | string | Optional | Region to build the snapshot in. Default: closest region |
Requirements
Output
json— Created snapshot detailsDaytona.CreateSshAccess
Create SSH access credentials for the sandbox. Returns connection details including host, port, username, and access token for direct SSH access. Use the token to authenticate SSH connections. SENSITIVE OUTPUT: The returned token grants SSH access to the sandbox. Avoid logging or displaying it in contexts where it could be inadvertently exposed. The token expires after ``expires_in_minutes`` (default 60 min). Set ``expires_in_minutes=0`` to create a non-expiring token (use with caution -- increases blast radius from accidental exposure).
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
expires_in_minutes | integer | Optional | Token validity in minutes. Set to 0 for no expiration. Default: 60 |
Requirements
Output
json— SSH connection detailsDaytona.DeleteFile
Delete a file or empty directory. Set recursive=True to delete non-empty directories.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Required | Path to file or directory to delete |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
recursive | boolean | Optional | Allow recursive deletion of directories. Must be True to delete non-empty directories. Default: False |
Requirements
Output
json— Deletion confirmationDaytona.DeleteSandbox
Permanently delete a sandbox and all its contents.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID to delete |
Requirements
Output
json— Confirmation of deletionDaytona.FindFiles
Search for files by name pattern (glob). Returns matching file paths. Response includes total count and has_more flag for pagination.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
pattern | string | Required | Glob pattern to match file names |
path | string | Optional | Directory to search in. Default: sandbox root |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
max_items | integer | Optional | Maximum results (1-200). Default: 50 |
offset | integer | Optional | Number of items to skip for pagination. Default: 0 |
Requirements
Output
json— Matching file paths with paginationDaytona.GetFileInfo
Get metadata about a file: size, permissions, modified time, type.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Required | File or directory path |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— File metadataDaytona.GetPortPreviewUrl
Get a preview URL for a web service running in the sandbox. Standard URLs require an auth token in the x-daytona-preview-token header. Signed URLs embed authentication in the URL itself -- useful for sharing.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
port | integer | Required | Port number (e.g. 3000, 8080) |
signed | boolean | Optional | Generate a signed URL with embedded auth. Default: False |
expires_in_seconds | integer | Optional | Expiry for signed URLs in seconds. Only used when signed=True. Default: 3600 |
Requirements
Output
json— Preview URL detailsDaytona.GetSandbox
Get detailed information about a sandbox. Returns state, resources, labels, auto-stop/archive settings, and timestamps. Environment variable values whose keys look secret-like (containing token, key, secret, password, auth) are redacted by default. Set include_raw_env_vars=True only when you need the actual values.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
include_raw_env_vars | boolean | Optional | Return env var values unredacted. Default: False (secret-like values are redacted) |
Requirements
Output
json— Detailed sandbox informationDaytona.GetSessionCommandLogs
Get output logs from a command running in a session. Useful for checking output of async commands (servers, builds).
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
session_id | string | Required | Session ID |
command_id | string | Required | Command ID to get logs for |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Command logsDaytona.GetSnapshot
Get detailed information about a snapshot. Accepts a snapshot name or ID. Returns full details including state, image, resources, entrypoint, and timestamps.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
snapshot | string | Required | Snapshot name or ID |
Requirements
Output
json— Detailed snapshot informationDaytona.GitAdd
Stage files for the next commit. Accepts file paths or '.' for all changes.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
files | array<string> | Required | Files to stage. Use ['.'] for all files |
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Staging confirmationDaytona.GitBranches
List all branches. Indicates which branch is currently checked out.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Branch listing with current indicatorDaytona.GitCheckout
Switch to a branch, tag, or commit. Optionally create a new branch. Default mode (create_new_branch=False): switches to an existing ref. Create mode (create_new_branch=True): creates a new branch named ref and switches to it, optionally from start_point.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
ref | string | Required | Branch name, tag, or commit to switch to. When create_new_branch is True, this is the name of the new branch. |
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
create_new_branch | boolean | Optional | Create a new branch named by ref and switch to it. Default: False |
start_point | string | Optional | Branch/tag/commit to create the new branch from. Only used when create_new_branch is True. Default: HEAD |
Requirements
Output
json— Checkout resultDaytona.GitClone
Clone a Git repository into the sandbox. For GitHub repos, authentication is handled automatically via Arcade's OAuth integration — the user is prompted to authorize once, and the token is managed by Arcade Engine. Consent is one-time; token refresh is automatic. Permission requirements by auth mode: - OAuth Apps mode: the "repo" scope is requested (full repo access). - GitHub Apps mode: the app installation must have "Contents: read" permission (for clone/pull) or "Contents: read & write" (for clone followed by push). For non-GitHub private repos, provide username + PAT as overrides.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
url | string | Required | Repository URL to clone |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
path | string | Optional | Destination path. Default: derived from repository URL |
branch | string | Optional | Branch to clone. Default: repository default branch |
commit_id | string | Optional | Specific commit SHA to check out after cloning. Default: HEAD of branch |
username | string | Optional | Username for HTTPS auth (non-GitHub remotes only). Default: None |
password | string | Optional | PAT for HTTPS auth (ignore this parameter for GitHub remotes — GitHub auth is handled automatically by the tool; all other remotes need a username + PAT). Default: None (ignore) |
Requirements
Output
json— Clone result with path and branch infoDaytona.GitCommit
Commit staged changes. Requires files to be staged first with git_add.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
message | string | Required | Commit message |
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
author_name | string | Optional | Author name. Default: from sandbox git config |
author_email | string | Optional | Author email. Default: from sandbox git config |
Requirements
Output
json— Commit result with SHADaytona.GitCreateBranch
Create a new branch and switch to it. Equivalent to git_checkout(ref=branch, create_new_branch=True, start_point=...).
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
branch | string | Required | Name for the new branch |
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
start_point | string | Optional | Branch/commit to branch from. Default: HEAD |
Requirements
Output
json— Branch creation resultDaytona.GitDeleteBranch
Delete a local branch.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
branch | string | Required | Branch name to delete |
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
force | boolean | Optional | Force delete unmerged branch. Default: False |
Requirements
Output
json— Deletion confirmationDaytona.GitLog
Get commit history. Returns commit hash, author, date, and message.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
max_count | integer | Optional | Maximum number of commits. Default: 20 |
branch | string | Optional | Branch to show log for. Default: current |
Requirements
Output
json— Commit historyDaytona.GitPull
Pull latest changes from the remote repository. For GitHub repos, authentication is automatic via OAuth. The SDK path is used by default. Shell fallback is used only when an explicit branch is requested. For non-GitHub remotes, credentials must have been provided during git_clone or configured manually in the sandbox.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
branch | string | Optional | Branch to pull. Default: current tracking branch |
Requirements
Output
json— Pull resultDaytona.GitPush
Push local commits to the remote repository. For GitHub repos, authentication is automatic via OAuth. The SDK path is used by default (no token in command args). Shell fallback is used only when force or explicit branch is requested. For non-GitHub remotes, credentials must have been provided during git_clone or configured manually in the sandbox.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
branch | string | Optional | Branch to push. Default: current branch |
force | boolean | Optional | Force push (overwrites remote history -- use with caution). Default: False |
Requirements
Output
json— Push resultDaytona.GitStatus
Get repository status: branch, staged/modified/untracked files, ahead/behind counts.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Path to git repository |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Repository statusDaytona.ListFiles
List files and directories. Returns name, type (file/dir), and size. Response includes total count and has_more flag for pagination.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Optional | Directory path relative to sandbox root. Default: sandbox root |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
pattern | string | Optional | Glob pattern to filter results within the directory |
max_items | integer | Optional | Maximum items to return (1-200). Default: 50 |
offset | integer | Optional | Number of items to skip for pagination. Default: 0 |
Requirements
Output
json— Directory listing with paginationDaytona.ListPorts
List active ports in the sandbox. Returns port number, state, and name for each active port. Use this to discover running services before calling get_port_preview_url.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— List of active portsDaytona.ListRegions
List available regions for sandbox creation. Returns region ID, name, and location (country, city). Useful for choosing where to create sandboxes or snapshots.
Parameters
No parameters required.
Requirements
Output
json— Available regionsDaytona.ListSandboxes
List sandboxes with optional filtering. Returns concise summary: name, state, created time, resources. Response includes total count, current page, and total_pages for pagination.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
state | string | Optional | Filter by sandbox statestartedstoppedarchivederror |
labels | json | Optional | Filter by labels. Only sandboxes matching all key-value pairs are returned. Default: None |
page | integer | Optional | Page number (1-indexed). Default: 1 |
page_size | integer | Optional | Items per page (1-100). Default: 20 |
Requirements
Output
json— Paginated list of sandboxesDaytona.ListSessions
List all active sessions in a sandbox with their status and recent commands. Result set is expected to be small (typically < 10); no pagination.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— List of active sessionsDaytona.ListSnapshots
List available snapshots with their status and creation date. Returns snapshot name, state, image, and resource defaults. Response includes total count, current page, and total_pages for pagination.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
page | integer | Optional | Page number (1-indexed). Default: 1 |
page_size | integer | Optional | Items per page (1-100). Default: 20 |
Requirements
Output
json— Paginated list of snapshotsDaytona.MoveFile
Move or rename a file or directory.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
source | string | Required | Source path |
destination | string | Required | Destination path |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Move confirmationDaytona.ReadFile
Read file contents from the sandbox. For large files, use start_line and end_line to read specific sections. Omit both to read the entire file. Known limitation: the full file is downloaded before line-range slicing is applied. For very large files this may be slow. The Daytona SDK does not currently expose range/chunk reads.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Required | File path relative to sandbox root |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
start_line | integer | Optional | First line to read (1-indexed). Default: None (start of file) |
end_line | integer | Optional | Last line to read (1-indexed, inclusive). Default: None (end of file) |
Requirements
Output
json— File contents with line infoDaytona.ReplaceInFiles
Find and replace text across multiple files. Accepts explicit file paths and glob patterns. Glob patterns are expanded in the tool layer before passing concrete paths to the SDK. Returns per-file success/error status and count of files modified.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
pattern | string | Required | Text or regex pattern to find |
replacement | string | Required | Replacement text |
files | array<string> | Required | File paths or glob patterns (e.g. 'src/**/*.py'). Globs are expanded before replacing |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Replacement resultsDaytona.ResizeSandbox
Resize sandbox resources. At least one param required. CPU and memory can increase while running; disk changes require a stopped sandbox. Disk can never decrease. GPU cannot be resized -- it is set at creation only.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
cpu | integer | Optional | New vCPU count (1-16). While running: increase only. While stopped: increase or decrease |
memory_gb | integer | Optional | New RAM in GB (1-64). While running: increase only. While stopped: increase or decrease |
disk_gb | integer | Optional | New disk in GB (1-200). Can only increase, never decrease. Requires sandbox to be stopped |
Requirements
Output
json— Updated sandbox info after resizingDaytona.RunCode
Execute code directly in the sandbox. No shell escaping needed -- code is passed directly to the interpreter. The language is determined by the sandbox's configured language at creation time. Returns output, exit code, and any generated charts as metadata. Note: Stateful execution via ``context_id`` is deferred to P1. The SDK supports ``code_interpreter.run_code(context=...)`` but it requires separate integration testing.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
code | string | Required | Code to execute |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
timeout_seconds | integer | Optional | Max execution time in seconds (1-300). Default: 30 |
Requirements
Output
json— Code execution resultsDaytona.RunCommand
Execute a shell command in the sandbox. Use for installing packages, running scripts, or system operations. For direct code execution, prefer run_code.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
command | string | Required | Shell command to execute |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
cwd | string | Optional | Working directory relative to sandbox root. Default: sandbox working directory |
env | json | Optional | Extra environment variables for this command. Default: None |
timeout_seconds | integer | Optional | Max execution time in seconds (1-600). Default: 60 |
Requirements
Output
json— Command execution resultsDaytona.RunSessionCommand
Execute a command inside an existing session. For long-running commands (servers, watchers), set async_exec=True and check output later with get_session_command_logs. When async_exec=True the command is queued/running in the background. The response will include ``status`` = "running" and ``exit_code`` will only be present if the backend already reports one. Do NOT assume exit_code=0 means the command succeeded -- it may still be running.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
session_id | string | Required | Session ID to execute in |
command | string | Required | Command to execute |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
async_exec | boolean | Optional | Run asynchronously (don't wait for completion). Default: False |
Requirements
Output
json— Command execution resultsDaytona.SearchContent
Search file contents for a text pattern. Shell-backed using grep. Returns matching files with line numbers (up to 50 matches per file). Use context_lines > 0 to include surrounding lines for each match. Supports basic regex syntax.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
query | string | Required | Text or regex pattern to search for in file contents (grep regex syntax) |
path | string | Optional | Directory to search in. Default: sandbox root |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
file_pattern | string | Optional | Glob pattern to limit which files are searched (e.g. '*.py') |
context_lines | integer | Optional | Number of lines to show before and after each match (0-5). Default: 0 |
max_items | integer | Optional | Maximum matching files to return (1-200). Default: 50 |
offset | integer | Optional | Number of items to skip for pagination. Default: 0 |
Requirements
Output
json— Search results with line numbersDaytona.SendSessionInput
Send input to a running interactive command in a session. Useful for commands that prompt for input (e.g., confirmation prompts). A newline is automatically appended to the input.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
session_id | string | Required | Session ID |
command_id | string | Required | Command ID to send input to |
input | string | Required | Input text to send (newline appended automatically) |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
Requirements
Output
json— Input sent confirmationDaytona.SetSandboxLabels
Replace all labels on a sandbox. Useful for tagging and filtering.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
labels | json | Required | Labels to set (replaces all existing labels) |
Requirements
Output
json— Updated sandbox infoDaytona.StartSandbox
Start a stopped or archived sandbox. Returns updated sandbox info.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
Requirements
Output
json— Updated sandbox info after startingDaytona.StopSandbox
Stop a running sandbox, preserving its state for later restart.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
sandbox | string | Required | Sandbox name or ID |
Requirements
Output
json— Updated sandbox info after stoppingDaytona.WhoAmI
Get the authenticated user's profile. Returns the user ID, name, and email associated with the current API key. Useful for confirming connectivity and identifying the API key owner.
Parameters
No parameters required.
Requirements
Output
json— Authenticated user's profile.Daytona.WriteFile
Write content to a file in the sandbox. Creates the file and parent dirs if needed.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
path | string | Required | File path relative to sandbox root |
content | string | Required | File content to write |
sandbox | string | Optional | Sandbox name or ID. Omit to auto-select when only one sandbox exists |
create_parents | boolean | Optional | Create parent directories if needed. Default: True |
Requirements
Output
json— Write confirmation