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 are experimental.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:
A sandbox’s own files are deleted with it; see
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.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.
- Access: every sandbox in your team can mount any of the team’s drives, so you don’t grant access drive by drive.
Next steps
Create a drive
Create a drive in the region that your sandboxes run in.
Mount a drive
Mount a drive in one or more running sandboxes.