Announcing Remote Filesystems for Mastra workspaces

Your agents can now work with remote filesystems like S3, GCS, Azure, and more.

Paul ScanlonPaul Scanlon·

Apr 29, 2026

·

2 min read

Instead of relying only on local storage, your agents can now work directly with remote filesystems. Attach a provider to your agent's workspace and it can read, write, and manage remote files the same way it does local ones.

Mastra currently supports the following remote filesystems: S3, GCS, Azure Blob, and AgentFS, with Google Drive support in progress: #15756.

Remote filesystems work alongside workspace sandboxes, which give agents the ability to run scripts, install packages, and execute CLI commands.

Get started

Install a remote filesystem provider (requires @mastra/core@1.12.0 or later).

 1npm install @mastra/s3

Create a workspace instance, configure a filesystem and assign it to an agent. This example uses S3Filesystem.

 1import { Agent } from "@mastra/core/agent";
 2import { Workspace } from "@mastra/core/workspace";
 3import { S3Filesystem } from "@mastra/s3";
 4
 5const workspace = new Workspace({
 6  filesystem: new S3Filesystem({
 7    bucket: "my-team-files",
 8    region: "us-east-1",
 9    accessKeyId: process.env.AWS_ACCESS_KEY_ID,
10    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
11  })
12});
13
14const fileAgent = new Agent({
15  id: "file-agent",
16  name: "File Agent",
17  model: "anthropic/claude-opus-4-6",
18  instructions: "You are a file management agent. Use the filesystem to read and write files.",
19  workspace
20});

Once configured, the agent can read and write files:

 1await agent.stream("Read /incoming/q2-report.md, write a concise summary to /reports/q2-summary.md, then list files in /reports.");

For more information and full configuration options, see:

To see remote filesystems in action, watch the walkthrough below. At 07:50, Alex demonstrates mounting a remote filesystem into a sandbox.

Also, Shane demos the Google Drive provider (in progress) at 49:02 in this workshop.

Share:
Paul Scanlon
Paul ScanlonTechnical Product Marketing Manager

Paul Scanlon sits between Developer Education and Product Marketing at Mastra. Previously, he was a Technical Product Marketing Manager at Neon and worked in Developer Relations at Gatsby, where he created educational content and developer experiences.

All articles by Paul Scanlon