🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@mastra/agentcore

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

0.2.2
View campaign page

@mastra/agentcore

AWS Bedrock AgentCore Runtime sandbox provider for Mastra workspaces

unpublished
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
1.1K
83.77%
Maintainers
1
Weekly downloads
 
Created
Source

@mastra/agentcore

AWS Bedrock AgentCore Runtime sandbox provider for Mastra workspaces.

Installation

npm install @mastra/agentcore

Usage

import { Workspace } from '@mastra/core/workspace';
import { AgentCoreRuntimeSandbox } from '@mastra/agentcore';

const workspace = new Workspace({
  sandbox: new AgentCoreRuntimeSandbox({
    region: 'us-west-2',
    agentRuntimeArn: process.env.AGENTCORE_RUNTIME_ARN!,
    runtimeSessionId: '12345678-1234-1234-1234-123456789012',
  }),
});

const result = await workspace.sandbox?.executeCommand?.('npm', ['test'], {
  cwd: '/workspace',
  timeout: 300_000,
});

AgentCoreRuntimeSandbox uses InvokeAgentRuntimeCommand to run one-shot shell commands inside an existing AgentCore Runtime session. It does not provide background process management or filesystem mounts.

By default, destroy() does not stop the AgentCore Runtime session because sessions can be shared with other AgentCore invocations. Call stopRuntimeSession() explicitly, or set stopSessionOnLifecycle: true, when the sandbox owns the session and should clean it up.

AgentCore Code Interpreter is a separate AgentCore service and is not part of this runtime sandbox provider.

FAQs

Package last updated on 17 Jun 2026

Did you know?

Socket

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.

Install

Related posts