agentskit.js
Memory

mongoAtlasVectorStore

MongoDB Atlas Vector Search. Caller injects a Collection-shaped client; \`mongodb\` driver stays as an external concern.

import { MongoClient } from 'mongodb'
import { mongoAtlasVectorStore } from '@agentskit/memory'

const client = new MongoClient(process.env.MONGO_URI!)
const collection = client.db('docs').collection('chunks')

const store = mongoAtlasVectorStore({
  collection,
  indexName: 'embedding_index',
})

Implements VectorMemory: store / search(embedding, options?) / delete. Inherits the VectorFilter contract for metadata-scoped retrieval.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page