# Memory

***

Memory allow you to chat with AI as if AI has the memory of previous conversations.

*<mark style="color:blue;">Human: hi i am bob</mark>*

*<mark style="color:orange;">AI: Hello Bob! It's nice to meet you. How can I assist you today?</mark>*

*<mark style="color:blue;">Human: what's my name?</mark>*

*<mark style="color:orange;">AI: Your name is Bob, as you mentioned earlier.</mark>*

Under the hood, these conversations are stored in arrays or databases, and provided as context to LLM. For example:

```
You are an assistant to a human, powered by a large language model trained by OpenAI.

Whether the human needs help with a specific question or just wants to have a conversation about a particular topic, you are here to assist.

Current conversation:
{history}
```

### Memory Nodes:

* [Buffer Memory](/integrations/langchain/memory/buffer-memory.md)
* [Buffer Window Memory](/integrations/langchain/memory/buffer-window-memory.md)
* [Conversation Summary Memory](/integrations/langchain/memory/conversation-summary-memory.md)
* [Conversation Summary Buffer Memory](/integrations/langchain/memory/conversation-summary-buffer-memory.md)
* [DynamoDB Chat Memory](/integrations/langchain/memory/dynamodb-chat-memory.md)
* [Mem0 Memory](https://github.com/FlowiseAI/FlowiseDocs/blob/main/en/integrations/langchain/memory/mem0-memory.md)
* [MongoDB Atlas Chat Memory](/integrations/langchain/memory/mongodb-atlas-chat-memory.md)
* [Redis-Backed Chat Memory](/integrations/langchain/memory/redis-backed-chat-memory.md)
* [Upstash Redis-Backed Chat Memory](/integrations/langchain/memory/upstash-redis-backed-chat-memory.md)
* [Zep Memory](/integrations/langchain/memory/zep-memory.md)

## Separate conversations for multiple users

### UI & Embedded Chat

By default, UI and Embedded Chat will automatically separate different users conversations. This is done by generating a unique **`chatId`** for each new interaction. That logic is handled under the hood by Flowise.

### Prediction API

You can separate the conversations for multiple users by specifying a unique **`sessionId`**

1. For every memory node, you should be able to see a input parameter **`Session ID`**

<figure><img src="/files/cpCNuWydsRsnOAVl4iKD" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/Ba0F71j0iMHPG9he7EfO" alt="" width="563"><figcaption></figcaption></figure>

2. In the `/api/v1/prediction/{your-chatflowid}` POST body request, specify the **`sessionId`** in **`overrideConfig`**

```json
{
    "question": "hello!",
    "overrideConfig": {
        "sessionId": "user1"
    }
}
```

### Message API

* GET `/api/v1/chatmessage/{your-chatflowid}`
* DELETE `/api/v1/chatmessage/{your-chatflowid}`

<table><thead><tr><th>Query Param</th><th width="192">Type</th><th>Value</th></tr></thead><tbody><tr><td>sessionId</td><td>string</td><td></td></tr><tr><td>sort</td><td>enum</td><td>ASC or DESC</td></tr><tr><td>startDate</td><td>string</td><td></td></tr><tr><td>endDate</td><td>string</td><td></td></tr></tbody></table>

All conversations can be visualized and managed from UI as well:

<figure><img src="/files/HbIQe3aJZqIrh9CKHlZj" alt=""><figcaption></figcaption></figure>

For OpenAI Assistant, [Threads](/integrations/langchain/agents/openai-assistant/threads.md) will be used to store conversations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/integrations/langchain/memory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
