
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@mastra/qdrant
Advanced tools
Affected versions:
Vector store implementation for Qdrant using the official @qdrant/js-client-rest SDK with added telemetry support.
pnpm add @mastra/qdrant
import { QdrantVector } from '@mastra/qdrant';
const vectorStore = new QdrantVector({
id: 'my-qdrant',
url: 'http://localhost:6333',
apiKey: 'optional-api-key', // optional
});
// Create a new collection
await vectorStore.createIndex({ indexName: 'myCollection', 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: 'myCollection', vectors, metadata });
// Query vectors
const results = await vectorStore.query({
indexName: 'myCollection',
queryVector: [0.1, 0.2, ...],
topK: 10,
filter: { text: { $eq: 'doc1' } }, // optional filter
includeVector: false,
});
// Query with named vectors (for collections with multiple vector fields)
const namedResults = await vectorStore.query({
indexName: 'myCollection',
queryVector: [0.1, 0.2, ...],
topK: 10,
using: 'title_embedding', // specify which named vector to query
});
Qdrant supports named vectors, allowing multiple vector fields per collection. This is useful for multi-modal data (text + images) or different embedding models.
// Create a collection with multiple named vector spaces
await vectorStore.createIndex({
indexName: 'multi_modal',
dimension: 768, // fallback
namedVectors: {
text: { size: 768, distance: 'cosine' },
image: { size: 512, distance: 'euclidean' },
},
});
// Upsert into specific vector spaces
await vectorStore.upsert({
indexName: 'multi_modal',
vectors: textEmbeddings,
metadata: [{ type: 'text' }],
vectorName: 'text', // target the text vector space
});
await vectorStore.upsert({
indexName: 'multi_modal',
vectors: imageEmbeddings,
metadata: [{ type: 'image' }],
vectorName: 'image', // target the image vector space
});
// Query specific vector spaces
const textResults = await vectorStore.query({
indexName: 'multi_modal',
queryVector: textQuery,
using: 'text',
});
const imageResults = await vectorStore.query({
indexName: 'multi_modal',
queryVector: imageQuery,
using: 'image',
});
Required:
id: Unique identifier for this vector store instanceurl: URL of your Qdrant instanceOptional:
apiKey: API key for authenticationhttps: Whether to use HTTPS (default: false)The following distance metrics are supported:
cosine → Cosine distanceeuclidean → Euclidean distancedotproduct → Dot productcreateIndex({ indexName, dimension, metric?, namedVectors? }): Create a new collection (supports named vectors)upsert({ indexName, vectors, metadata?, ids?, vectorName? }): Add or update vectors (supports named vectors)query({ indexName, queryVector, topK?, filter?, includeVector?, using? }): Search for similar vectorsupdateVector({ indexName, id?, filter?, update }): Update a single vector by ID or metadata filterdeleteVector({ indexName, id }): Delete a single vector by IDdeleteVectors({ indexName, ids?, filter? }): Delete multiple vectors by IDs or metadata filtercreatePayloadIndex({ indexName, fieldName, fieldSchema, wait? }): Create a payload index for filteringdeletePayloadIndex({ indexName, fieldName, wait? }): Delete a payload indexlistIndexes(): List all collectionsdescribeIndex(indexName): Get collection statisticsdeleteIndex(indexName): Delete a collectionFAQs
Qdrant vector store provider for Mastra
The npm package @mastra/qdrant receives a total of 5,908 weekly downloads. As such, @mastra/qdrant popularity was classified as popular.
We found that @mastra/qdrant demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.