Switch from Daytona
| Daytona | Runtime |
|---|---|
daytona.create() |
POST /v2/sandboxes |
sandbox.process.executeCommand(cmd) |
POST /v2/sandboxes/{id}:exec |
sandbox.process.createSession(), executeSessionCommand() |
POST /v2/sandboxes/{id}:exec with wait false, POST /v2/sandboxes/{id}/processes/{process}:write, GET /v2/sandboxes/{id}/processes/{process}/output |
sandbox.fs.uploadFile(), downloadFile() |
PUT /v2/sandboxes/{id}/files, GET /v2/sandboxes/{id}/files |
sandbox.getPreviewLink(port) |
POST /v2/sandboxes/{id}/previews |
sandbox.stop(), sandbox.start() |
POST /v2/sandboxes/{id}:pause, POST /v2/sandboxes/{id}:resume: memory and processes are kept |
sandbox.delete() |
DELETE /v2/sandboxes/{id} |
| Snapshots | snapshots |
Pythonfrom withruntime.generated import Runtimeruntime = Runtime()sandbox = runtime.sandboxes.create()try: response = runtime.sandboxes.exec(sandbox.id, cmd="echo $((6 * 7))") print(response.stdout) # 42 assert response.exit_code == 0 and response.stdout.strip() == "42", responsefinally: runtime.sandboxes.delete(sandbox.id)A stopped Daytona sandbox restarts with an empty memory; a paused Runtime sandbox resumes with its programs still running, and costs only its storage, $0.18 per GB-month, while paused.
Give this to your agent#
Paste this into your coding agent:
Read https://withruntime.com/docs/switch-from-daytona.md. Replace every Daytona call in this project with its Runtime call, on a branch, remove the Daytona SDK, run the project's tests and its real job on Runtime, and fix what fails. Never delete the Daytona account or its keys.
This page as Markdown: https://withruntime.com/docs/switch-from-daytona.md
Try it on your own work.Signing up takes no card. Your first sandbox asks for one, and the trial starts then. Or paste the setup prompt into your agent.