Brezel
Brezel is an open-source, self-hosted Firecracker sandbox runtime for autonomous agents.
Installation
npm install computesdk @computesdk/brezelConfigure a project-scoped service token, the public HTTPS endpoint, and a prequalified immutable environment revision:
BREZEL_API_KEY=your_project_scoped_token
BREZEL_API_URL=https://brezel.example.com
BREZEL_PROJECT_ID=agents
BREZEL_ENVIRONMENT_REVISION=envr_qualified
BREZEL_ALLOW_INTERNET=falseUsage
import { brezel } from '@computesdk/brezel';
const compute = brezel({
apiKey: process.env.BREZEL_API_KEY,
baseUrl: process.env.BREZEL_API_URL,
project: process.env.BREZEL_PROJECT_ID,
environmentRevision: process.env.BREZEL_ENVIRONMENT_REVISION,
allowInternet: false,
});
const sandbox = await compute.sandbox.create();
const result = await sandbox.runCommand('node --version');
console.log(result.stdout);
await sandbox.destroy();Configuration options
apiKey
BREZEL_API_KEY
Project-scoped Brezel service token.
baseUrl
BREZEL_API_URL
Public HTTPS endpoint for the Brezel deployment.
project
BREZEL_PROJECT_ID
Project boundary used for sandbox operations.
environmentRevision
BREZEL_ENVIRONMENT_REVISION
Prequalified immutable environment revision used by default.
allowInternet
BREZEL_ALLOW_INTERNET
Allows outbound internet access when exactly true; defaults to false.
apiTimeoutMs
—
Timeout for Brezel management API operations, in milliseconds.
Supported operations
create
✅
Uses a prequalified immutable environment revision.
getById
✅
Returns null for absent or terminal sandboxes.
list
✅
Lists active sandboxes in the configured project.
destroy
✅
Waits for a confirmed terminal state or resource absence.
runCommand
✅
Supports env, cwd, background execution, and output callbacks.
getInfo
✅
Includes the environment revision and Brezel resource revision.
getUrl
✅
Creates a time-limited preview lease for a guest port.
filesystem
✅
Native file reads/writes plus directory operations.
snapshot
❌
Not exposed through ComputeSDK yet.
templateId may override the configured immutable environment revision for a single create call. Arbitrary image builds are intentionally outside the request path.
Create-time environment variables are not exposed because Brezel cannot yet restore them durably after reconnection. Pass environment variables to runCommand instead.
Last updated
Was this helpful?