Mount and access are different things
The most common point of confusion is treating a mount as an access boundary. It is not. Mounting and accessing a drive are two separate operations, and permissions govern access, not the mount.- Mounting is a client-side operation. It projects a drive’s contents into a sandbox’s filesystem at a mount path, so the workload can read and write files with a standard POSIX interface. Mounting a drive is like serving a website locally: it changes where the content appears, not who is allowed to reach it.
- Accessing is reaching the drive’s contents. Agent Drive exposes an internal HTTP API, so a workload can read and write a drive’s files directly, whether or not the drive is mounted anywhere.
How permissions work
Permissions are a list of access control rules attached to a drive. A workload is granted access when it matches a rule, and the same rules apply whether the workload mounts the drive or calls the HTTP API directly. Each drive can have up to 3 permission rules. A permission rule contains:
Rules are evaluated with OR logic: the first matching rule grants access with its
mode and path. Within a single rule, all specified labels must match (AND logic). If no rule matches, access is denied.
Label matching
Workload labels are automatically injected into the workload’s identity token at creation time. These include infrastructure labels (likeblaxel-workspace, blaxel-type, blaxel-name) and any user-defined labels set on the resource’s metadata.
To add user-defined labels to a sandbox, set them in labels when creating the resource:
Create a drive with permissions
Update permissions on an existing drive
Permissions can be modified on a drive that is already in use.permissions to an empty array.
Permission patterns
Restrict to a single team
Only workloads withteam: "data-science" can access the drive:
TypeScript
AND logic (multiple labels in one rule)
The workload must have bothteam: "backend" AND env: "production" to match:
TypeScript
OR logic (multiple rules)
Eitherteam: "backend" OR team: "ml" can access the drive:
TypeScript
Read-only access for some teams
The backend team gets full access, the frontend team can only read:TypeScript
Path scoping
Restrict a workload to a specific subfolder within the drive:TypeScript
/reports, whether it reads them through the API or mounts the drive.
Behavior summary
Agent Drive overview
Create, mount, and manage drives.
Sandboxes overview
Learn about sandbox lifecycle and configuration.
