Skip to Content
Langchain js mongodb. js integrations for MongoDB through their SDK.
![]()
Langchain js mongodb Javascript: Source code, LangChain. MongoDB is a NoSQL, document-oriented database that supports JSON-like documents with a dynamic schema. . In addition to now supporting Atlas Vector Search as a Vector Store there is already support to utilize MongoDB as a chat log history. It supports native Vector Search, full text search (BM25), and hybrid search on your MongoDB document data. Check out this accompanying tutorial and notebook on building advanced RAG with MongoDB and LangChain, which contains a walkthrough and use cases for using semantic cache, vector search, and chat message history. LangChain simplifies building the chatbot logic, while MongoDB Atlas' vector MongoDB. Overview The MongoDB Document Loader returns a list of Langchain Documents from a MongoDB database. MongoDB is a NoSQL , document-oriented database that supports JSON-like documents with a dynamic schema. js integrations for MongoDB through their SDK. To learn how to integrate Atlas Vector Search with LangGraph, see Integrate MongoDB with LangGraph. js supports MongoDB Atlas as a vector store, and supports both standard similarity search and maximal marginal relevance search, which takes a combination of documents are most similar to Install and import from the "@langchain/mongodb" integration package instead. This component stores each entity as a document with relationship fields that reference other documents in your collection. Class that extends the BaseStore class to interact with a MongoDB database. Voyage AI joins MongoDB to power more accurate and trustworthy AI applications on Atlas. js. The Loader requires the following parameters: MongoDB connection string; MongoDB database name; MongoDB collection name Documentation for LangChain. MongoDBGraphStore is a component in the LangChain MongoDB integration that allows you to implement GraphRAG by storing entities (nodes) and their relationships (edges) in a MongoDB collection. This notebook covers how to MongoDB Atlas vector search in LangChain, using the langchain-mongodb package. MongoDB also provides the following developer resources: AI Shop: The Power of LangChain, OpenAI, and MongoDB Atlas Working Together. Class that is a wrapper around MongoDB Atlas Vector Search. LangChain and MongoDB Atlas are a natural fit, and it’s been demonstrated by the organic community enthusiasm which has led to several integrations in LangChain for MongoDB. It contains the following packages. NOTE: See other MongoDB integrations on the MongoDB Atlas page. js, making it easy to integrate with other AI tools and libraries. MongoDB. This package contains the LangChain. js fits perfectly with LangChain. Sep 18, 2024 · Unlock the potential of your JavaScript RAG app with MongoDB and LangChain. Start using @langchain/mongodb in your project by running `npm i @langchain/mongodb`. If you are using this package with other LangChain packages, you should make sure that all of the packages Jun 22, 2023 · LangChain and MongoDB Atlas. You can still create API routes that use MongoDB with Next. May 12, 2025 · An integration package connecting MongoDB and LangChain Skip to main content Switch to mobile version Warning Some features may not work without JavaScript. js by setting the runtime variable to nodejs like so: Sep 18, 2024 · These features make LangGraph. There are 9 other projects in the npm registry using @langchain/mongodb. It is used to store embeddings in MongoDB documents, create a vector search index, and perform K-Nearest Neighbors (KNN) search with an approximate nearest neighbor algorithm. js docs, MongoDB docs. This is a Monorepo containing partner packages of MongoDB and LangChainAI. MongoDB Atlas. Enhance AI systems with memory, improving response relevance. js documentation here . Sample integration for LangChain. Initial Cluster Configuration To create a MongoDB Atlas cluster, navigate to the MongoDB Atlas website and create an account if you don’t already have one. langchain-mongodb ; langgraph-checkpoint-mongodb ; Note: This repository replaces all MongoDB integrations currently present in the langchain-community package @langchain/mongodb. 1. Latest version: 0. And, of course, LangGraph. LangChain. MongoDB Developer GitHub Repository Only available on Node. To use MongoDB Atlas vector stores, you’ll need to configure a MongoDB Atlas cluster and install the @langchain/mongodb integration package. Installation npm install @langchain/mongodb Copy. Mar 20, 2024 · Python: Source code, LangChain docs, MongoDB docs. This starter template implements a Retrieval-Augmented Generation (RAG) chatbot using LangChain, MongoDB Atlas, and Render. js by setting the runtime variable to nodejs like so: export const runtime = "nodejs" ; You can read more about Edge runtimes in the Next. 0, last published: 9 months ago. Get started today. This package, along with the main LangChain package, depends on @langchain/core. MongoDB Atlas is a fully-managed cloud database available in AWS, Azure, and GCP. RAG combines AI language generation with knowledge retrieval for more informative responses. js an ideal choice for developing sophisticated AI agents that can maintain context and handle complex interactions. It includes integrations between MongoDB, Atlas, LangChain, and LangGraph. Installation and Setup Install the Python package: Documentation for LangChain. yqx ufcu tbdh syj syr yzryzd zuu jprjqe xhvncza oeyvu