Skip to content

Commit c77e701

Browse files
Pash10gimchairmanm
andauthored
MongoDB as Chat Memory Provider (#3001)
Co-authored-by: Justin Ellingwood <[email protected]>
1 parent 8292cd7 commit c77e701

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
3+
title: MongoDB Chat Memory node documentation
4+
description: Learn how to use the MongoDB Chat Memory node in n8n. Follow technical documentation to integrate MongoDB Chat Memory node into your workflows.
5+
contentType: [integration, reference]
6+
---
7+
8+
# MongoDB Chat Memory node
9+
10+
Use the MongoDB Chat Memory node to use MongoDB as a [memory](/glossary.md#ai-memory) server for storing chat history.
11+
12+
On this page, you'll find a list of operations the MongoDB Chat Memory node supports, and links to more resources.
13+
14+
/// note | Credentials
15+
You can find authentication information for this node [here](/integrations/builtin/credentials/mongodb.md).
16+
///
17+
18+
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
19+
20+
## Node parameters
21+
22+
* **Session Key**: Enter the key to use to store the memory in the workflow data.
23+
* **Collection Name**: Enter the name of the collection to store the chat history in. The system will create the collection if it doesn't exist.
24+
* **Database Name**: Enter the name of the database to store the chat history in. If not provided, the database from credentials will be used.
25+
* **Context Window Length**: Enter the number of previous interactions to consider for context.
26+
27+
## Related resources
28+
29+
Refer to [LangChain's MongoDB Chat Message History documentation](https://js.langchain.com/docs/integrations/memory/mongodb){:target=_blank .external-link} for more information about the service.
30+
31+
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
32+
33+
## Single memory instance
34+
35+
[[% include "_includes/integrations/cluster-nodes/memory-shared.html" %]]
36+
37+
--8<-- "_glossary/ai-glossary.md"

Diff for: docs/integrations/builtin/credentials/mongodb.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ You can use these credentials to authenticate the following nodes:
1212

1313
- [MongoDB](/integrations/builtin/app-nodes/n8n-nodes-base.mongodb.md)
1414
- [MongoDB Atlas Vector Store](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas.md)
15+
- [MongoDB Chat Memory](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymongochat.md)
1516

1617
## Prerequisites
1718

Diff for: nav.yml

+1
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ nav:
734734
- integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorybufferwindow/index.md
735735
- Common issues: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorybufferwindow/common-issues.md
736736
- Motorhead: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymotorhead.md
737+
- MongoDB Chat Memory: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymongochat.md
737738
- Redis Chat Memory: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memoryredischat.md
738739
- Postgres Chat Memory: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorypostgreschat.md
739740
- Xata: integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memoryxata.md

0 commit comments

Comments
 (0)