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

@mastra/vectorize

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

1.0.3
View campaign page

@mastra/vectorize

Cloudflare Vectorize store provider for Mastra

unpublished
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
4K
147.22%
Maintainers
1
Weekly downloads
 
Created
Source

@mastra/vectorize

Vector store implementation for Vectorize, a managed vector database service optimized for AI applications.

Installation

npm install @mastra/vectorize

Usage

import { VectorizeStore } from '@mastra/vectorize';

const vectorStore = new VectorizeStore({
  apiKey: process.env.VECTORIZE_API_KEY,
  projectId: process.env.VECTORIZE_PROJECT_ID
});

// Create a new index
await vectorStore.createIndex({
  indexName: 'my-index',
  dimension: 1536,
  metric: 'cosine'
});

// Add vectors
const vectors = [[0.1, 0.2, ...], [0.3, 0.4, ...]];
const metadata = [{ text: 'doc1' }, { text: 'doc2' }];
const ids = await vectorStore.upsert({
  indexName: 'my-index',
  vectors,
  metadata
});

// Query vectors
const results = await vectorStore.query({
  indexName: 'my-index',
  queryVector: [0.1, 0.2, ...],
  topK: 10,
  filter: { text: { $eq: 'doc1' } },
  includeVector: false
});

Configuration

The Vectorize vector store requires the following configuration:

  • VECTORIZE_API_KEY: Your Vectorize API key
  • VECTORIZE_INDEX_NAME: Name of the index to use
  • VECTORIZE_PROJECT_ID: Your Vectorize project ID

Features

  • Purpose-built for AI and ML workloads
  • High-performance vector similarity search
  • Automatic index optimization
  • Scalable architecture
  • Real-time updates and queries

Methods

  • createIndex({ indexName, dimension, metric? }): Create a new index
  • upsert({ indexName, vectors, metadata?, ids? }): Add or update vectors
  • query({ indexName, queryVector, topK?, filter?, includeVector? }): Search for similar vectors
  • listIndexes(): List all indexes
  • describeIndex(indexName): Get index statistics
  • deleteIndex(indexName): Delete an index
  • Vectorize 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