New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@mastra/e2b

Package Overview
Dependencies
Maintainers
7
Versions
334
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

0.3.4
View campaign page

@mastra/e2b

E2B cloud sandbox provider for Mastra workspaces

latest
Source
npmnpm
Version
0.12.1
Version published
Weekly downloads
39K
94.64%
Maintainers
7
Weekly downloads
 
Created
Source

@mastra/e2b

E2B cloud sandbox provider for Mastra workspaces. Provides secure, isolated code execution environments with support for mounting cloud storage.

Installation

npm install @mastra/e2b

Usage

import { Agent } from '@mastra/core/agent';
import { Workspace } from '@mastra/core/workspace';
import { E2BSandbox } from '@mastra/e2b';

const workspace = new Workspace({
  sandbox: new E2BSandbox({
    apiKey: 'my-api-key', // falls back to E2B_API_KEY env var
    timeout: 60_000, // 60 second timeout (default: 5 minutes)
  }),
});

const agent = new Agent({
  name: 'my-agent',
  model: 'anthropic/claude-opus-4-5',
  workspace,
});

Documentation

  • E2B integration guide
  • Workspace documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

FAQs

Package last updated on 22 Sep 2026

Related posts