Simple Memory Node Not Isolating Sessions Correctly (Session ID Issue)
Hello callin.io Community,
I’m currently working on a chatbot project using callin.io Cloud (free tier) and I’m encountering a persistent issue with the Simple Memory
node that I can’t seem to resolve, despite extensive debugging.
Project Overview:
I have a web-based chatbot (HTML/JavaScript frontend) that communicates with a callin.io webhook. The callin.io workflow uses an AI Agent
(connected to Google Gemini) for chatbot logic and aims to store conversation history using the Simple Memory
node. User and bot messages, along with a unique sessionId
(UUID generated on the frontend), are then passed through the workflow.
The Problem:
The Simple Memory
node does not appear to be isolating chat history based on the provided sessionId
. Even when I open the chatbot on different devices or in new Incognito/Private browser windows, the bot continues the conversation from a previous session, as if it’s using a single, global memory store instead of creating/retrieving memory per sessionId
.
What I’ve Already Checked and Confirmed:
- Frontend
sessionId
Generation: The frontend successfully generates a unique UUID forsessionId
for each new browser session (or whenlocalStorage
is cleared). - Webhook Input: The
Webhook
node correctly receives theuserMessage
and thesessionId
within thebody
of the incoming JSON. For example, the input to theSimple Memory
node consistently contains a uniquesessionId
like"fbafe9c1-5b6d-49e5-9f3d-f56741a24515"
. Edit Fields
Node: A precedingEdit Fields
node correctly transforms{{ $json.body.userMessage }}
into abody
field that contains the user’s message.AI Agent
Node Prompt: ThePrompt (User Message)
field in theAI Agent
node is correctly set to{{ $json.body }}
.-
Simple Memory
Node Configuration:Session ID
is set to{{ $json.body.sessionId }}
(and it’s confirmed to be recognized as an expression, not plain text).Key
is set touserMessage
.Context Window Length
is50
.
-
Simple Memory
Node Behavior: Despite a uniquesessionId
being passed into theSimple Memory
node’s INPUT, thechatHistory
in its OUTPUT (and thus passed to theAI Agent
) often contains messages from previous, unrelated sessions. It seems the memory is not being correctly partitioned by thesessionId
. For instance, if a new session starts with “hello,” thechatHistory
might still include “smart fridge” from an earlier, distinct session. - Debugging Steps: I’ve tried deactivating and reactivating the workflow in callin.io Cloud, and testing with clean browser sessions (incognito mode), but the issue persists.
My Question:
Given that the sessionId
is correctly transmitted and configured in the Simple Memory
node, what could be causing the memory not to be isolated per session? Is this a known limitation or bug with the Simple Memory
node, especially on the free tier of callin.io Cloud? Or am I missing a crucial configuration step for proper session isolation?
Any help or insights would be greatly appreciated!
Thank you!
I can confirm that this is also occurring for me. I was just about to post my question regarding this.
I am utilizing callin.io cloud (paid tier). I have identified an issue with my callin.io ChatBot. My AI Agent is configured to use Simple Memory with the Session ID (the default approach). I am setting the Session ID in a Set node and using it consistently throughout the workflow.
Has anyone else encountered an issue with Simple Memory? I could switch to Postgres Chat Memory or Redis, but based on the Execution logs, I'm not convinced that will resolve the problem.
It seems to be appending a prior Session ID's simple memory to the AI Agent System Message. Upon reviewing the Execution log, I can confirm that the Session ID differs from the previous session.
Does Simple Memory append to the System prompt? My expectation is that it would instead follow this methodology:
json
[
{ "role": "user", "content": "{prior msg}" },
{ "role": "assistant", "content": "{prior msg}" }
]
This is certainly a significant issue. Having callin.io incorporate information from a prior session's Simple Memory constitutes a security vulnerability.
Here’s some additional screenshots and information regarding this issue:
The naming convention indicates the Datetime of the recorded worksession. I've highlighted 07:28:07 the most because that's when the AI agent contacted Stacy, referring to her as “Frank”. You can see the sessionID is clearly Stacy’s (it begins with “b11d”), but the System Prompt contains the history from Frank. I've included the July14071120Frank.png screenshot, which represents the actual Frank contact, and you can observe that its sessionID starts with “0a01405”.
Could you show me an example of the input JSON before the Simple Memory node, specifically the fields it expects, including the sessionId
?
I've identified my issue, and I suspect it might be a similar problem for others as well.
Even though I had configured the key for my "Simple Memory" using a variable named {{ $json.sessionId }}
, and I confirmed that this variable consistently held the correct sessionId, I overlooked that the default setting for the key is "Fixed".
Moreover, the "Fixed" versus "Expression" option is not immediately apparent; it only becomes visible when you hover your mouse over the Key.
I suggest that callin.io should default the key to "Expression" and ensure it is always visible.
While I haven't completed full testing, I am highly confident that this adjustment will resolve my "Simple Memory" issue and any similar problems others may be experiencing.
I don't believe this is the solution for my use case, as it's already incorporated into the expression. When I attempt to copy my workflow to another empty workflow, it functions perfectly. I often employ this method. Perhaps you could try this approach. However, this isn't a definitive solution. Thank you.
Please embed your workflow here if you're comfortable, perhaps I can offer some assistance.