> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Drives

> Share one set of files across many running sandboxes with a drive, storage that belongs to your team and outlasts the sandboxes that use it.

A *drive* is storage that belongs to your team instead of to one sandbox.
Running [sandboxes](https://docs.baseten.co/sandboxes/overview.md) mount a drive as a directory, and many
sandboxes can mount the same drive at once, so they read and write the same
files. A drive keeps its files after the sandboxes that used it are deleted.
Only sandboxes can mount drives.

> [!NOTE]
>
> Drives are in pre-release in the Baseten CLI (`baseten drive` and `baseten sandbox drive`) and in the Python, TypeScript, and Go SDKs (`baseten`, `@basetenlabs/client`, `@basetenlabs/sandbox`, and `baseten-go`). Commands, methods, and responses can change. The [Management API drive operations](https://docs.baseten.co/reference/management-api/overview.md#drives) are experimental.

Drives are available only to organizations that have them turned on.
[Contact us](mailto:support@baseten.co) to request access.

## When to use a drive

Use a drive when more than one sandbox needs the same files:

* An agent's notes and history stay on the drive, and the next sandbox
  continues from them.
* Many sandboxes write results to one drive, and another sandbox reads them.
* Sandboxes mount a dataset or a dependency cache instead of downloading it
  again.
* One agent leaves files for another without copying them through another
  service.

## Drives, volumes, and the sandbox filesystem

Sandboxes have three places to keep files:

| Property | Sandbox filesystem | [Sandbox volume](https://docs.baseten.co/sandboxes/volumes.md) | Drive |
| - | - | - | - |
| Used by | One sandbox | One sandbox at a time | Many sandboxes at once |
| When you attach it | Always there | When you create the sandbox | Any time, in a running sandbox |
| Outlives the sandbox | No | Yes | Yes |
| Size | Set by the sandbox | Set when you create the volume, and can grow | Not set when you create the drive |

A sandbox's own files are deleted with it; see
[Local data](https://docs.baseten.co/sandboxes/lifecycle.md#local-data).

## How mounting works

You mount a drive into a sandbox that's already running. You can't attach a
drive when you create a sandbox. A mount can cover the whole drive or one
folder in it, and it can be read-write or read-only. One drive can have
read-write and read-only mounts in different sandboxes at the same time.

A mount lasts until you unmount it, including while the sandbox is in standby.
The sandbox's own record doesn't list its mounts; to see them,
[list the sandbox's drive mounts](https://docs.baseten.co/drives/list-drive-mounts.md).

## Regions and access

* **Region**: each drive lives in one region, and every sandbox in that region
  can mount it. A new drive uses your default sandbox region unless you choose
  another one when you create it, and it keeps its name and region for its
  whole life. To match a drive to your sandboxes, check a sandbox's region with
  [Get a sandbox](https://docs.baseten.co/sandboxes/manage.md#get-a-sandbox).
* **Access**: every sandbox in your team can mount any of the team's drives,
  so you don't grant access drive by drive.

Set up the SDK or the CLI in [Create a drive](https://docs.baseten.co/drives/create-drives.md#set-up), then create the drive in the region where your sandboxes run.

## Next steps

> [card] [Create a drive](https://docs.baseten.co/drives/create-drives.md)
>
> Create a drive in the region that your sandboxes run in.

> [card] [Mount a drive](https://docs.baseten.co/drives/mount-drives.md)
>
> Mount a drive in one or more running sandboxes.
