daytonaio/daytona
#255 this week
Daytona is a Secure and Elastic Infrastructure for Running AI-Generated Code
ai
ai-agents
developer-tools
agentic-workflow
ai-runtime
ai-sandboxes
code-execution
code-interpreter
TypeScript
AGPL-3.0
72.4K stars
5.5K forks
72.4K GitHub watchers
Updated 5/4/2026
Backblaze Generative Media Hackathon
Build the next generation of AI media apps with Genblaze, stored on Backblaze B2. $10,000 in prizes.
Loading star history...
Use Cases & Benefits
- Daytona provides a secure, elastic infrastructure for running AI-generated code with isolated sandboxes to protect host environments.
- Key features include sub-90ms sandbox creation, OCI/Docker compatibility, programmatic control via APIs, and support for Python and TypeScript SDKs.
- Strengths are fast, isolated execution and unlimited sandbox persistence; limitations may include reliance on API keys and potential complexity in setup.
- Organizations can use Daytona to safely execute AI workflows and code interpreters in production, enabling scalable, concurrent AI code execution.
- Ideal use cases include AI agent workflows, secure code execution environments, developer tools for AI code testing, and sandboxed AI runtime environments.
About daytona
Run AI Code.
Secure and Elastic Infrastructure for
Running Your AI-Generated Code.
Documentation · Report Bug · Request Feature · Join our Slack · Connect on X
Installation
Python SDK
pip install daytona
TypeScript SDK
npm install @daytonaio/sdk
Features
- Lightning-Fast Infrastructure: Sub-90ms Sandbox creation from code to execution.
- Separated & Isolated Runtime: Execute AI-generated code with zero risk to your infrastructure.
- Massive Parallelization for Concurrent AI Workflows: Fork Sandbox filesystem and memory state (Coming soon!)
- Programmatic Control: File, Git, LSP, and Execute API
- Unlimited Persistence: Your Sandboxes can live forever
- OCI/Docker Compatibility: Use any OCI/Docker image to create a Sandbox
Quick Start
- Create an account at https://app.daytona.io
- Generate a new API key
- Follow the Getting Started docs to start using the Daytona SDK
Creating your first Sandbox
Python SDK
from daytona import Daytona, DaytonaConfig, CreateSandboxParams
# Initialize the Daytona client
daytona = Daytona(DaytonaConfig(api_key="YOUR_API_KEY"))
# Create the Sandbox instance
sandbox = daytona.create(CreateSandboxParams(language="python"))
# Run code securely inside the Sandbox
response = sandbox.process.code_run('print("Sum of 3 and 4 is " + str(3 + 4))')
if response.exit_code != 0:
print(f"Error running code: {response.exit_code} {response.result}")
else:
print(response.result)
# Clean up the Sandbox
daytona.remove(sandbox)
Typescript SDK
import { Daytona } from '@daytonaio/sdk'
async function main() {
// Initialize the Daytona client
const daytona = new Daytona({
apiKey: 'YOUR_API_KEY',
})
let sandbox
try {
// Create the Sandbox instance
sandbox = await daytona.create({
language: 'python',
})
// Run code securely inside the Sandbox
const response = await sandbox.process.codeRun('print("Sum of 3 and 4 is " + str(3 + 4))')
if (response.exitCode !== 0) {
console.error('Error running code:', response.exitCode, response.result)
} else {
console.log(response.result)
}
} catch (error) {
console.error('Sandbox flow error:', error)
} finally {
if (sandbox) await daytona.remove(sandbox)
}
}
main().catch(console.error)
Contributing
Daytona is Open Source under the GNU AFFERO GENERAL PUBLIC LICENSE, and is the copyright of its contributors. If you would like to contribute to the software, read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/). Afterwards, navigate to the contributing guide to get started.
Discover Repositories
Search across tracked repositories by name or description