base on Daytona is a Secure and Elastic Infrastructure for Running AI-Generated Code <div align="center"> [![Documentation](https://img.shields.io/github/v/release/daytonaio/docs?label=Docs&color=23cc71)](https://www.daytona.io/docs) ![License](https://img.shields.io/badge/License-AGPL--3-blue) [![Go Report Card](https://goreportcard.com/badge/github.com/daytonaio/daytona)](https://goreportcard.com/report/github.com/daytonaio/daytona) [![Issues - daytona](https://img.shields.io/github/issues/daytonaio/daytona)](https://github.com/daytonaio/daytona/issues) ![GitHub Release](https://img.shields.io/github/v/release/daytonaio/daytona) </div> &nbsp; <div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-white.png"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-black.png"> <img alt="Daytona logo" src="https://github.com/daytonaio/daytona/raw/main/assets/images/Daytona-logotype-black.png" width="50%"> </picture> </div> <h3 align="center"> Run AI Code. <br/> Secure and Elastic Infrastructure for Running Your AI-Generated Code. </h3> <p align="center"> <a href="https://www.daytona.io/docs"> Documentation </a>· <a href="https://github.com/daytonaio/daytona/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=%F0%9F%90%9B+Bug+Report%3A+"> Report Bug </a>· <a href="https://github.com/daytonaio/daytona/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=%F0%9F%9A%80+Feature%3A+"> Request Feature </a>· <a href="https://go.daytona.io/slack"> Join our Slack </a>· <a href="https://x.com/daytonaio"> Connect on X </a> </p> <p align="center"> <a href="https://www.producthunt.com/posts/daytona-2?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-daytona&#0045;2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=957617&theme=neutral&period=daily&t=1746176740150" alt="Daytona&#0032; - Secure&#0032;and&#0032;elastic&#0032;infra&#0032;for&#0032;running&#0032;your&#0032;AI&#0045;generated&#0032;code&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> <a href="https://www.producthunt.com/posts/daytona-2?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-daytona&#0045;2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=957617&theme=neutral&period=monthly&topic_id=237&t=1746176740150" alt="Daytona&#0032; - Secure&#0032;and&#0032;elastic&#0032;infra&#0032;for&#0032;running&#0032;your&#0032;AI&#0045;generated&#0032;code&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> </p> --- ## Installation ### Python SDK ```bash pip install daytona ``` ### TypeScript SDK ```bash 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 1. Generate a [new API key](https://app.daytona.io/dashboard/keys) 1. Follow the [Getting Started docs](https://www.daytona.io/docs/getting-started/) to start using the Daytona SDK ## Creating your first Sandbox ### Python SDK ```py from daytona import Daytona, DaytonaConfig, CreateSandboxBaseParams # Initialize the Daytona client daytona = Daytona(DaytonaConfig(api_key="YOUR_API_KEY")) # Create the Sandbox instance sandbox = daytona.create(CreateSandboxBaseParams(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.delete(sandbox) ``` ### Typescript SDK ```jsx 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: 'typescript', }) // Run code securely inside the Sandbox const response = await sandbox.process.codeRun('console.log("Sum of 3 and 4 is " + (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.delete(sandbox) } } main().catch(console.error) ``` --- ## Contributing Daytona is Open Source under the [GNU AFFERO GENERAL PUBLIC LICENSE](LICENSE), and is the [copyright of its contributors](NOTICE). 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](CONTRIBUTING.md) to get started. ", Assign "at most 3 tags" to the expected json: {"id":"8396","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"