A long-term persistent key-value store backed by MongoDB. Supports hierarchical namespace organization with Put, Get, ListNamespaces, and Search operations.
class MongoDBStoreExecute a batch of operations (Put, Get, ListNamespaces, Search). Operations are processed in order, but multiple consecutive Puts are batched. PutOperations are deduplicated by (namespace, key) — last write wins.
Delete an item from the store.
Retrieve a single item by its namespace and key.
List and filter namespaces in the store. Used to explore data organization and navigate the namespace hierarchy.
Store or update an item.
Search for items within a namespace prefix. Supports both metadata filtering and vector similarity search.
Initialize the store: creates the {namespace, key} unique index and an optional TTL index.
Clean up the store. Closes the underlying MongoClient only if the store created it (i.e. via fromConnString). When the client was supplied to the constructor by the caller, the caller owns its lifecycle.
Factory method to create a MongoDBStore from a connection string. Automatically creates and connects a MongoDB client, and calls start to ensure required indexes exist.