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

@mastra/rag

Package Overview
Dependencies
Maintainers
1
Versions
845
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:

2.2.2
View campaign page

@mastra/rag

The Retrieval-Augmented Generation (RAG) module contains document processing and embedding utilities.

unpublished
Source
npmnpm
Version
2.2.2
Version published
Weekly downloads
88K
36.02%
Maintainers
1
Weekly downloads
 
Created
Source

@mastra/rag

The Retrieval-Augmented Generation (RAG) module contains document processing and embedding utilities.

Installation

npm install @mastra/rag

Components

Document

The MDocument class represents text content with associated metadata:

import { MDocument } from '@mastra/rag';

const doc = new MDocument({
  text: 'Document content',
  metadata: { source: 'example.txt' },
});

Documentation

Keywords

rag

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