Agents

Mastra launches managed sandboxes for AI agents

Mastra has launched managed sandboxes and filesystems in alpha, giving AI agents secure, persistent environments for code execution and file storage directly through its platform.

Mastra Blog3 Aug 2026Agents
Image: Mastra Blog

Mastra has introduced managed sandboxes and filesystems directly integrated into its platform, simplifying how developers provision computing environments for AI agents. Currently in alpha, this update allows developers to equip their agents with persistent file storage and secure execution environments without the complex setup typically required when connecting to third-party sandbox providers. The feature is powered by the new @mastra/platform-workspace SDK, which introduces the PlatformFilesystem and PlatformSandbox primitives.

The PlatformFilesystem acts as a durable storage bucket, allowing agents to write reports, documents, and code that persist across conversations, deployments, and system restarts. Meanwhile, the PlatformSandbox provides an isolated environment where agents can safely execute commands away from the production server. To minimize latency, the platform maintains a warmed base image for the sandbox, ensuring rapid startup times. These resources are automatically colocated with the developer's Studio and Server to optimize performance and reduce costs.

Infrastructure management is handled entirely by Mastra, with filesystems and sandboxes provisioned automatically per environment, keeping staging and production data strictly isolated. Credentials are automatically injected as environment variables during deployment. Instead of introducing a separate infrastructure bill, billing is consolidated, sharing the project's existing CPU time and data egress. Developers can monitor these resources through the Workspaces tab, which displays bucket contents and recent sandbox sessions, including exit codes and command durations.

For practitioners, this release eliminates the friction of managing external sandbox infrastructure. The new tools also support local development; by adding environment variables to a .env file, the local PlatformFilesystem and PlatformSandbox connect directly to the same cloud-based buckets and sandbox pools. The system integrates with existing @mastra/core configurations, meaning developers only need to import the new package and register the workspace on their main Mastra instance to deploy.

This is our own summary of reporting by Mastra Blog

More in Agents