• ISOLATION
  • PERSISTENCE
  • CLEANUP
  • HUMAN

How to automate ephemeral test environments with your AI

Connect Daytona to your AI client to spin up isolated workspaces on demand. Your agent handles the heavy lifting of cloning environments and managing data volumes.

Ask AI about this page

Short answer

How can I use AI to manage test environments?

Your AI uses Daytona to fork existing sandboxes and attach persistent storage for testing. This allows you to create, use, and clean up isolated environments through natural language. You get a repeatable way to test code in fresh, identical setups.

The outcomes of automation.

Where your test data lands.

Once connected, your AI manages the entire lifecycle of your test infrastructure.

ISOLATION

Clean sandbox clones

Your AI creates fresh copies of your standard environments. This ensures every test run starts from a known, clean state.

PERSISTENCE

Managed data volumes

The AI handles storage by creating and attaching volumes. Your test data stays put even when the sandbox is destroyed.

CLEANUP

Automated teardown

Your agent wipes away unused volumes and sandboxes. This prevents storage bloat and keeps your workspace tidy.

HUMAN

Manual oversight

You decide when to keep a volume or delete a sandbox. The AI follows your specific instructions for every environment lifecycle event.

The workflow

What your AI does when the request arrives.

The AI translates your intent into specific infrastructure actions.

  1. Clone the environment

    The AI creates a fresh, isolated workspace based on your existing setup.

    fork_sandbox
  2. Setup storage

    Your agent creates a new volume to hold the data needed for the test.

    create_volume
  3. Verify data

    The AI checks the available storage to ensure the right volume is ready.

    list_volumesget_volume_by_name
  4. Clean up

    After the test finishes, the AI removes the temporary storage.

    delete_volume

Try it

Copy these to start.

Use these prompts to trigger environment actions.

Starting points

These are starting points. Swap out the repo names and volume names for your actual project details.

Daytona Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_AkqYHK4XFPqtgrdtnVnobFEfCwP5QQF4omfr3EXo/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Daytona capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "daytona-dev-workspaces-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_AkqYHK4XFPqtgrdtnVnobFEfCwP5QQF4omfr3EXo/mcp"
    }
  }
}
Copy into chat04
  • Fork a new sandbox from my 'production-template' repo.

  • Create a new volume named 'test-data-vol' for my current workspace.

  • List all my existing volumes so I can see what is active.

  • Delete the volume named 'temp-test-storage' once the run is done.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Daytona once, then ask.

Just link your account once. Your credentials stay encrypted, and you can immediately start managing workspaces through your chat interface.

Connect Daytona to your AI

FAQ

How this task behaves.

  • 01

    Can the AI delete my main production database?

    No. The AI only has the ability to delete volumes through the specific tool provided. It cannot touch your primary production databases or infrastructure outside of these managed volumes.

  • 02

    Does the AI automatically delete sandboxes after I'm done?

    No. The AI only deletes sandboxes or volumes if you explicitly tell it to do so in your prompt.

  • 03

    Can I see what volumes are currently active?

    Yes. Your AI can list all existing volumes to show you what is currently taking up space.

  • 04

    Can the AI create a sandbox from any random URL?

    No. The AI can only fork sandboxes that are part of your existing Daytona environment setup.

  • 05

    Will the AI remember my data if I don't create a volume?

    No. If you don't use the tool to create a persistent volume, any data written to a sandbox will be lost when that sandbox is removed.

  • More questions about Daytona? See everything the Daytona Connector can do

Connect Daytona to Claude, Cursor, ChatGPT & more