Skip to main content

MongoDB

Bundles contain custom components that support specific third-party integrations with Langflow.

This page describes the components that are available in the MongoDB bundle.

MongoDB Atlas

The MongoDB Atlas component reads and writes to MongoDB Atlas vector stores using an instance of MongoDBAtlasVectorSearch.

About vector store instances

Because Langflow is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.

In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.

Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow. For information about specific options, see the LangChain API reference and vector store provider's documentation.

If you use a vector store component to query your vector database, it produces search results that you can pass to downstream components in your flow as a list of Data objects or a tabular DataFrame. If both types are supported, you can set the format near the vector store component's output port in the visual editor.

MongoDB Atlas parameters

You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.

Some parameters are hidden by default in the visual editor. You can modify all parameters through the Controls in the component's header menu.

Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters. Conditional parameters may not be visible on the Controls pane until you set the required dependencies.

For information about accepted values and functionality, see the MongoDB Atlas documentation or inspect component code.

NameTypeDescription
mongodb_atlas_cluster_uriSecretStringInput parameter. The connection URI for your MongoDB Atlas cluster. Required.
enable_mtlsBooleanInput parameter. Enable mutual TLS authentication. Default: false.
mongodb_atlas_client_certSecretStringInput parameter. Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled.
db_nameStringInput parameter. The name of the database to use. Required.
collection_nameStringInput parameter. The name of the collection to use. Required.
index_nameStringInput parameter. The name of the Atlas Search index, it should be a Vector Search. Required.
insert_modeStringInput parameter. How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append".
embeddingEmbeddingsInput parameter. The embedding model to use.
number_of_resultsIntegerInput parameter. Number of results to return in similarity search. Default: 4.
index_fieldStringInput parameter. The field to index. Default: "embedding".
filter_fieldStringInput parameter. The field to filter the index.
number_dimensionsIntegerInput parameter. Embedding vector dimension count. Default: 1536.
similarityStringInput parameter. The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine".
quantizationStringInput parameter. Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary".
Search