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. Similarly, drive access control is currently only possible at workspace level: once a drive is mounted in a sandbox, the sandbox has sufficient credentials to access all other drives in the same workspace. A quotas system for drive storage and more fine-grained access control features are 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
Learn more about authentication on Blaxel
Learn more about authentication on Blaxel
The Blaxel SDK requires two environment variables to authenticate:
You can create an API key from the Blaxel console. Your workspace name is visible in the URL when you log in to the console (e.g. When developing locally, you can also log in to your workspace with Blaxel CLI (as shown above). This allows you to run Blaxel SDK functions that will automatically connect to your workspace without additional setup. When you deploy on Blaxel, authentication is handled automatically — no environment variables needed.
| Variable | Description |
|---|---|
BL_WORKSPACE | Your Blaxel workspace name |
BL_API_KEY | Your Blaxel API key |
app.blaxel.ai/{workspace}).Set them as environment variables or add them to a .env file at the root of your project: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.
