suna/backend/sandbox
mykonos-ibiza c4979642fb Refactor agent and sandbox management: streamline sandbox creation, add caching for agent run limits and Stripe customer data, and improve error handling. Update API documentation and logging for better clarity. 2025-08-09 16:21:14 +05:30
..
docker Added Pandas to sandbox docker image. 2025-08-02 18:28:26 +05:30
README.md Replace sandbox image with snapshot in Daytona configuration 2025-07-19 22:25:21 +00:00
api.py perf(sandbox): switch to async daytona sdk (#891) 2025-07-04 21:12:53 +05:30
sandbox.py Replace sandbox image with snapshot in Daytona configuration 2025-07-19 22:25:21 +00:00
tool_base.py Refactor agent and sandbox management: streamline sandbox creation, add caching for agent run limits and Stripe customer data, and improve error handling. Update API documentation and logging for better clarity. 2025-08-09 16:21:14 +05:30

README.md

Agent Sandbox

This directory contains the agent sandbox implementation - a Docker-based virtual environment that agents use as their own computer to execute tasks, access the web, and manipulate files.

Overview

The sandbox provides a complete containerized Linux environment with:

  • Chrome browser for web interactions
  • VNC server for accessing the Web User
  • Web server for serving content (port 8080) -> loading html files from the /workspace directory
  • Full file system access
  • Full sudo access

Customizing the Sandbox

You can modify the sandbox environment for development or to add new capabilities:

  1. Edit files in the docker/ directory
  2. Build a custom image:
    cd backend/sandbox/docker
    docker compose build
    docker push kortix/suna:0.1.3
    
  3. Test your changes locally using docker-compose

Using a Custom Snapshot

To use your custom sandbox snapshot:

  1. Change the image parameter in docker-compose.yml (that defines the image name kortix/suna:___)
  2. Build and create a snapshot in Daytona with the same name
  3. Update the snapshot name in backend/sandbox/sandbox.py in the create_sandbox function
  4. If using Daytona for deployment, update the snapshot reference there as well

Publishing New Versions

When publishing a new version of the sandbox:

  1. Update the version number in docker-compose.yml (e.g., from 0.1.2 to 0.1.3)
  2. Build the new image: docker compose build
  3. Push the new version: docker push kortix/suna:0.1.3
  4. Create a new snapshot in Daytona with the same name
  5. Update all references to the snapshot version in:
    • backend/utils/config.py
    • Daytona snapshots
    • Any other services using this snapshot