This feature is currently in private preview. During the preview, the Agent Drive feature is only available in the
us-was-1 region. Both your drive and your sandbox must be created in this region. Drive size is not configurable at the moment. A quotas system for drive storage is coming soon. Request access.- A drive can be attached to an already-running sandbox at any mount path, without needing to recreate the sandbox
- Multiple sandboxes can mount the same drive simultaneously with full read-write access.
- A specific subdirectory of a drive can be mounted using
drivePath(instead of mounting the entire drive). - Drives scale automatically with no fixed capacity limits. Pre-provisioning or run-time resizing is not required.
Use cases
Some examples of use cases are:- Passing data or files from one sandbox to another directly, without needing intermediary storage or services
- Storing tool call outputs and context histories for use in other agents
- Sharing common datasets across agents
- Creating a shared filesystem cache of package dependencies to speed up future agent/sandbox deployments
Create a drive
Set up authentication to Blaxel
Set up authentication to Blaxel
The Blaxel SDK authenticates with your workspace using credentials from these sources, in priority order:
- when running on Blaxel, authentication is handled automatically
- variables in your
.envfile (BL_WORKSPACEandBL_API_KEY, or see this page for other authentication options). - environment variables from your machine
- configuration file created locally when you log in through Blaxel CLI (or deploy on Blaxel)
name and region. You can also optionally specify the display name and labels for the drive.
createIfNotExists() to retrieve an existing drive or create a new one if it doesn’t exist:
Mount a drive to a sandbox
Mount a drive to a running sandbox by specifying thedriveName, the mountPath (where the drive will appear in the sandbox’s filesystem), and optionally the drivePath (a subdirectory within the drive to mount).
/mnt/data inside the sandbox will be stored on the drive and persist even after the sandbox is deleted.
