Skip to main content
Volumes are persistent, team scoped filesystems that you can attach to a sandbox at launch. You can attach a volume to multiple sandboxes, and a volume is synced across writes. A volume persists even after all sandboxes are stopped, so you can completely isolate your data needs from your sandbox compute.

Quick Start

  1. Create a volume.
  2. Mount it when creating a sandbox.
  3. Read and write files at the mount path.
import { Hyperbrowser } from "@hyperbrowser/sdk";

const client = new Hyperbrowser({
  apiKey: process.env.HYPERBROWSER_API_KEY,
});

// 1) Create volume
const volume = await client.volumes.create({ name: "my-workspace" });

// 2) Create sandbox with mounted volume
const sandbox = await client.sandboxes.create({
  imageName: "node",
  mounts: {
    "/mnt/workspace": {
      id: volume.id,
      type: "rw",
    },
  },
});

// 3) Write/read through mounted path
await sandbox.files.writeText("/mnt/workspace/hello.txt", "hello from volume");
const text = await sandbox.files.readText("/mnt/workspace/hello.txt");
console.log(text);

Why Volumes

Use volumes when you need data to outlive a sandbox and be reused later:
  • Persistent workspaces for agents.
  • Reusable caches across runs.
  • Shared read only data mounted into multiple sandboxes over time.

Volume Lifecycle

  • Create volumes via SDKs, volume endpoints, or hx volume.
  • Mount volumes during sandbox creation
  • Access files through the mounted path with normal sandbox filesystem operations.

In This Section