
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@mastra/blaxel
Advanced tools
Affected versions:
Blaxel cloud sandbox provider for Mastra workspaces. Provides secure, isolated code execution environments with support for mounting cloud storage (S3, GCS) via FUSE.
npm install @mastra/blaxel
import { Agent } from '@mastra/core/agent';
import { Workspace } from '@mastra/core/workspace';
import { BlaxelSandbox } from '@mastra/blaxel';
const workspace = new Workspace({
sandbox: new BlaxelSandbox({
timeout: '5m', // sandbox TTL (default: 5 minutes)
memory: 4096, // memory in MB (default: 4096)
region: 'auto', // region selection (default: BL_REGION or auto)
}),
});
const agent = new Agent({
name: 'my-agent',
model: 'anthropic/claude-opus-4-5',
workspace,
});
| Option | Type | Default | Description |
|---|---|---|---|
id | string | auto-generated | Unique identifier for the sandbox instance |
image | string | 'blaxel/ts-app:latest' | Docker image to use |
memory | number | 4096 | Memory allocation in MB |
timeout | string | '5m' | Sandbox TTL as a duration string (e.g. '5m', '1h') |
region | string | BL_REGION or 'auto' | Blaxel region where the sandbox should be created |
env | Record<string, string> | — | Environment variables to set in the sandbox |
labels | Record<string, string> | — | Custom labels for the sandbox |
runtimes | SandboxRuntime[] | ['node', 'python', 'bash'] | Supported runtimes |
ports | Array<{ name?, target, protocol? }> | — | Ports to expose from the sandbox |
Blaxel sandboxes can mount S3 or GCS filesystems, making cloud storage accessible as a local directory inside the sandbox.
import { Workspace } from '@mastra/core/workspace';
import { S3Filesystem } from '@mastra/s3';
import { BlaxelSandbox } from '@mastra/blaxel';
const workspace = new Workspace({
mounts: {
'/data': new S3Filesystem({
bucket: 'my-bucket',
region: 'us-east-1',
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
}),
},
sandbox: new BlaxelSandbox(),
});
import { Workspace } from '@mastra/core/workspace';
import { GCSFilesystem } from '@mastra/gcs';
import { BlaxelSandbox } from '@mastra/blaxel';
const workspace = new Workspace({
mounts: {
'/data': new GCSFilesystem({
bucket: 'my-bucket',
serviceAccountKey: process.env.GCS_SERVICE_ACCOUNT_KEY,
}),
},
sandbox: new BlaxelSandbox(),
});
For advanced use cases, you can specify a custom Docker image:
const workspace = new Workspace({
sandbox: new BlaxelSandbox({
image: 'my-custom-image:latest',
}),
});
For more information, see the Mastra Workspaces documentation.
FAQs
Blaxel cloud sandbox provider for Mastra workspaces
The npm package @mastra/blaxel receives a total of 1,828 weekly downloads. As such, @mastra/blaxel popularity was classified as popular.
We found that @mastra/blaxel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.