RA

Run AI Code. Secure and Elastic Infrastructure for Running Your AI-Generated Code.

Created 3 months ago

Run AI Code. Secure and Elastic Infrastructure for Running Your AI-Generated Code.

development documentation public AI infrastructure

What is Run AI Code. Secure and Elastic Infrastructure for Running Your AI-Generated Code.?

Daytona provides lightning-fast infrastructure for creating and executing AI-generated code in isolated sandboxes, ensuring zero risk to your infrastructure. It supports massive parallelization for concurrent workflows and offers programmatic control through various APIs.

Documentation

Documentation License Go Report Card Issues - daytona GitHub Release

 

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

  1. Create an account at https://app.daytona.io
  2. Generate a new API key
  3. 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.

Server Config

{
  "mcpServers": {
    "run-ai-code.-secure-and-elastic-infrastructure-for-running-your-ai-generated-code.-server": {
      "command": "npx",
      "args": [
        "run-ai-code.-secure-and-elastic-infrastructure-for-running-your-ai-generated-code."
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: Yes
Global: Yes
Official: Yes

Project Info

Hosted Featured
Created At: Aug 06, 2025
Updated At: Aug 07, 2025
Author: Daytona Contributors
Category: AI Infrastructure
License: GNU AFFERO GENERAL PUBLIC LICENSE
Tags:
development documentation public