Daytona Documentation
Daytona is secure and elastic cloud infrastructure built for autonomous agents.
Daytona provides composable computers for agents — sandboxes — virtual machines with hardware isolation, a dedicated kernel, filesystem, network, and allocated vCPU, RAM, and disk.
Sandboxes are the core component of the Daytona platform, spinning up in under 90ms from code to execution and running any code in Python, TypeScript, and JavaScript. Built on OCI/Docker compatibility and massive parallelization, sandboxes deliver consistent, predictable environments for AI, autonomous agents, and reinforcement learning.
Get started
Section titled “Get started”- Create an account → app.daytona.com
- Get an API key → app.daytona.com/dashboard/keys
- Save the API key →
DAYTONA_API_KEYenvironment variable or in a.envfile.
DAYTONA_API_KEY=YOUR_API_KEYexport DAYTONA_API_KEY=YOUR_API_KEY$env:DAYTONA_API_KEY="YOUR_API_KEY"-
Install the Python SDK
Terminal window pip install daytona -
Create a sandbox and run code
from daytona import Daytonadaytona = Daytona()sandbox = daytona.v2.create()response = sandbox.run_code('print("Hello World")')print(response.logs.stdout)
-
Install the TypeScript SDK
Terminal window npm install @daytona/sdk -
Create a sandbox and run code
import { Daytona } from '@daytona/sdk'const daytona = new Daytona()const sandbox = await daytona.v2.create()const response = await sandbox.runCode('print("Hello World")')console.log(response.logs.stdout)
-
Install the CLI
Terminal window brew install daytonaio/cli/daytonaTerminal window # Downloads the amd64 or arm64 binary for this hostARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \sudo curl -fL "https://github.com/daytona/clients/releases/latest/download/daytona-linux-$ARCH" -o /usr/local/bin/daytona && \sudo chmod +x /usr/local/bin/daytonaTerminal window powershell -Command "irm https://get.daytona.io/windows | iex" -
Log in
Terminal window daytona login --token "$DAYTONA_API_KEY" --api-url https://api.daytona.comTerminal window daytona login --token "$env:DAYTONA_API_KEY" --api-url https://api.daytona.com -
Create a sandbox and run code
Terminal window daytona sandbox createdaytona sandbox exec {sandboxId} -- python -c 'print("Hello World")'
-
Create a sandbox and run code
Terminal window # Create sandboxcurl 'https://api.daytona.com/sandboxes' \--request POST \--header 'Content-Type: application/json' \--header "Authorization: Bearer $DAYTONA_API_KEY" \--data '{}'# Wait until runningcurl 'https://api.daytona.com/sandboxes/{sandboxId}?wait=running&timeout_ms=60000' \--header "Authorization: Bearer $DAYTONA_API_KEY"# Run codecurl 'https://toolbox.daytona.com/toolbox/{sandboxId}/processes?waitMs=30000&logs=text' \--request POST \--header 'Content-Type: application/json' \--header "Authorization: Bearer $DAYTONA_API_KEY" \--data '{"kind": "code", "language": "python", "code": "print(\"Hello World\")"}'
References
Section titled “References”Daytona provides a comprehensive set of resources for developers and agents to get started and build on the platform. You can find the following resources in the documentation:
- Daytona Sandboxes: Linux, macOS
- Daytona SDKs: TypeScript, Python
- Daytona APIs: Platform (OpenAPI), Toolbox (OpenAPI)
- Daytona CLI: Mac/Linux/Windows
- Daytona LLMs: llms.txt, llms-full.txt
- Daytona Markdown: suffix pages with .md (e.g sandboxes.md)