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

@mastra/agentfs

Package Overview
Dependencies
Maintainers
1
Versions
151
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.1.1
View campaign page

@mastra/agentfs

AgentFS (Turso/SQLite-backed) filesystem provider for Mastra workspaces

unpublished
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
1.1K
34.42%
Maintainers
1
Weekly downloads
 
Created
Source

@mastra/agentfs

AgentFS (Turso/SQLite-backed) filesystem provider for Mastra workspaces. Stores files in a local SQLite database via the agentfs-sdk, giving agents persistent storage that survives across sessions.

Installation

npm install @mastra/agentfs

Usage

import { Agent } from '@mastra/core/agent';
import { Workspace } from '@mastra/core/workspace';
import { AgentFSFilesystem } from '@mastra/agentfs';

const workspace = new Workspace({
  filesystem: new AgentFSFilesystem({
    agentId: 'my-agent', // stores at .agentfs/my-agent.db
  }),
});

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

Using an explicit database path

const workspace = new Workspace({
  filesystem: new AgentFSFilesystem({
    path: '/data/my-agent.db',
  }),
});

Using a pre-opened AgentFS instance

import { AgentFS } from 'agentfs-sdk';
import { AgentFSFilesystem } from '@mastra/agentfs';

const agent = await AgentFS.open({ id: 'my-agent' });

const workspace = new Workspace({
  filesystem: new AgentFSFilesystem({
    agent, // caller manages open/close
  }),
});

Documentation

For more information, see the Mastra Workspaces documentation.

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