Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 7, 2026·3 min de lecture

Daytona Snapshots — Reproducible AI Workspaces

Daytona Snapshots freeze a sandbox state — files, processes, environment — and create new sandboxes in milliseconds. Build agent tree search & benchmarks.

Daytona
Daytona · Community
Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : New
Point d'entrée
Asset
Commande CLI universelle
npx tokrepo install 9bdcb279-aab3-4554-ba02-eacb9dabf513
Introduction

Daytona Snapshots freeze a complete sandbox state — files, installed packages, environment variables, and even running processes (where supported) — into an immutable image. Spin up new sandboxes from a snapshot in milliseconds. Best for: agent tree-search algorithms, reproducible benchmark fixtures, branching exploration where multiple agents try different approaches from the same starting state. Works with: Daytona Python / TypeScript SDK. Setup time: 1 minute.


Take a snapshot

from daytona import Daytona

daytona = Daytona()

# Set up a base environment
sandbox = daytona.create()
sandbox.process.exec("apt-get install -y postgresql")
sandbox.process.exec("git clone https://github.com/example/app /work")
sandbox.process.exec("cd /work && npm install")

# Freeze the state — fast restore for downstream tasks
snapshot_id = sandbox.snapshot(name="app-base-2026-05-07")

Spin up many sandboxes from one snapshot

# Each sandbox starts at the snapshot state — no re-install, no clone
sb_lint = daytona.create_from_snapshot(snapshot_id)
sb_test = daytona.create_from_snapshot(snapshot_id)
sb_e2e = daytona.create_from_snapshot(snapshot_id)

# Run different things in parallel
sb_lint.process.exec("npm run lint")
sb_test.process.exec("npm test")
sb_e2e.process.exec("npx playwright test")

Tree search for agents

def explore(snapshot, depth=0, max_depth=3):
    if depth >= max_depth:
        return evaluate(snapshot)

    candidates = generate_next_actions(snapshot)
    best_score = -float("inf")
    best_action = None

    for action in candidates:
        sb = daytona.create_from_snapshot(snapshot)
        sb.process.exec(action.command)
        new_snapshot = sb.snapshot()
        score = explore(new_snapshot, depth + 1, max_depth)
        if score > best_score:
            best_score, best_action = score, action

    return best_score

Each branch is a real sandbox with real state — agents can run tests, observe failures, and decide based on actual outcomes rather than hallucinated predictions.

Reproducible benchmarks

# Bench fixture — frozen state for SWE-Bench / HumanEval / etc
fixture = daytona.create_from_snapshot("swebench-django-3.2.fixture")

# Apply the agent's patch
fixture.fs.upload_file("/repo/patch.diff", patch_text)
fixture.process.exec("cd /repo && git apply patch.diff")

# Run the test suite
result = fixture.process.exec("cd /repo && pytest tests/django/")
score(result)

Same fixture for every model run — no flaky environment differences.


FAQ

Q: Are snapshots free? A: Snapshots count toward your Daytona storage quota. Free tier includes some snapshot storage; production usage is metered per-GB-month. Check daytona.io/pricing for current rates.

Q: How big can a snapshot be? A: Snapshots can be tens of GBs (full Linux + dependencies + data). Daytona uses copy-on-write under the hood — creating a sandbox from a snapshot doesn't duplicate the data, so spawning many branches from one snapshot is cheap.

Q: Are snapshots cross-account-shareable? A: Yes — snapshots can be made public or shared within an organization. Useful for distributing benchmark fixtures or starter environments across a team.


Quick Use

  1. Have a Daytona sandbox configured (pip install daytona-sdk)
  2. Set up the base state with sandbox.process.exec(...), then call sandbox.snapshot(name="...")
  3. Spawn branches with daytona.create_from_snapshot(snapshot_id)

Intro

Daytona Snapshots freeze a complete sandbox state — files, installed packages, environment variables, and even running processes (where supported) — into an immutable image. Spin up new sandboxes from a snapshot in milliseconds. Best for: agent tree-search algorithms, reproducible benchmark fixtures, branching exploration where multiple agents try different approaches from the same starting state. Works with: Daytona Python / TypeScript SDK. Setup time: 1 minute.


Take a snapshot

from daytona import Daytona

daytona = Daytona()

# Set up a base environment
sandbox = daytona.create()
sandbox.process.exec("apt-get install -y postgresql")
sandbox.process.exec("git clone https://github.com/example/app /work")
sandbox.process.exec("cd /work && npm install")

# Freeze the state — fast restore for downstream tasks
snapshot_id = sandbox.snapshot(name="app-base-2026-05-07")

Spin up many sandboxes from one snapshot

# Each sandbox starts at the snapshot state — no re-install, no clone
sb_lint = daytona.create_from_snapshot(snapshot_id)
sb_test = daytona.create_from_snapshot(snapshot_id)
sb_e2e = daytona.create_from_snapshot(snapshot_id)

# Run different things in parallel
sb_lint.process.exec("npm run lint")
sb_test.process.exec("npm test")
sb_e2e.process.exec("npx playwright test")

Tree search for agents

def explore(snapshot, depth=0, max_depth=3):
    if depth >= max_depth:
        return evaluate(snapshot)

    candidates = generate_next_actions(snapshot)
    best_score = -float("inf")
    best_action = None

    for action in candidates:
        sb = daytona.create_from_snapshot(snapshot)
        sb.process.exec(action.command)
        new_snapshot = sb.snapshot()
        score = explore(new_snapshot, depth + 1, max_depth)
        if score > best_score:
            best_score, best_action = score, action

    return best_score

Each branch is a real sandbox with real state — agents can run tests, observe failures, and decide based on actual outcomes rather than hallucinated predictions.

Reproducible benchmarks

# Bench fixture — frozen state for SWE-Bench / HumanEval / etc
fixture = daytona.create_from_snapshot("swebench-django-3.2.fixture")

# Apply the agent's patch
fixture.fs.upload_file("/repo/patch.diff", patch_text)
fixture.process.exec("cd /repo && git apply patch.diff")

# Run the test suite
result = fixture.process.exec("cd /repo && pytest tests/django/")
score(result)

Same fixture for every model run — no flaky environment differences.


FAQ

Q: Are snapshots free? A: Snapshots count toward your Daytona storage quota. Free tier includes some snapshot storage; production usage is metered per-GB-month. Check daytona.io/pricing for current rates.

Q: How big can a snapshot be? A: Snapshots can be tens of GBs (full Linux + dependencies + data). Daytona uses copy-on-write under the hood — creating a sandbox from a snapshot doesn't duplicate the data, so spawning many branches from one snapshot is cheap.

Q: Are snapshots cross-account-shareable? A: Yes — snapshots can be made public or shared within an organization. Useful for distributing benchmark fixtures or starter environments across a team.


Source & Thanks

Built by Daytona. Apache-2.0 (core).

daytona.io/docs — Snapshots documentation

🙏

Source et remerciements

Built by Daytona. Apache-2.0 (core).

daytona.io/docs — Snapshots documentation

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires