Problem Description:
I’m experiencing a critical issue with the “Memoire-court-terme” (Short-term Memory) tool in my AI Agent workflow. The chatHistory remains empty ([ ]) across all interactions, causing my AI to lose conversation context and repeat questions.
Expected Behavior:
The chatHistory should accumulate previous messages and maintain conversation context between interactions.
Actual Behavior:
- chatHistory: [ ] always empty
- AI loses context after each message
- Conversations restart from the beginning each time
Configuration:
Memoire-court-terme settings:
- Session ID: {{ $(‘When chat message received’).item.json.sessionId }}
- Context Window Length: 20 (tested with 20, 50, 100)
- SessionID value: new for new conversation and then consistent across messages
Workflow structure:
When chat message received → AI Agent (with Memoire-court-terme) → Respond to Webhook
Logs showing the issue:
Input to Memoire-court-terme:
{
“action”: “loadMemoryVariables”,
“values”: {
“input”: “générer plus de prospects”,
“system_message”: “…”
}
}
Output from Memoire-court-terme:
{
“action”: “loadMemoryVariables”,
“chatHistory”: // ← ALWAYS EMPTY!
}
At the end:
{
“action”: “saveContext”,
“input”: {…},
“output”: {…}
}
What I’ve tried:
Increased Context Window Length (20 → 50 → 100)
Verified SessionID consistency across messages
Checked workflow configuration multiple times
Disabled conflicting memory tools (custom Supabase tools)
Tested with minimal workflow (same issue)
Recreated workflow from scratch (same issue)
Additional Context:
- This exact workflow worked perfectly on a different n8n account previously
- Same configuration, same credentials, different account = different behavior
- The sessionID is properly generated and consistent
- The saveContext action seems to execute but data doesn’t persist
Environment:
- n8n version: Version 1.104.1 (on a VPS)
- AI Agent tool with OpenAI Chat Model
- Using webhook triggers for chat interface
Questions for the community:
- Has anyone experienced similar issues with the Memory tool not persisting?
- Are there known version differences in how Memory tools behave?
- Is there a configuration step I might be missing for proper persistence?
- Any debugging steps to troubleshoot memory persistence issues?
- Alternative approaches for maintaining conversation context in AI Agents?
Temporary workaround:
Currently considering reverting to custom Supabase-based memory management with proper session filtering.
Any help would be greatly appreciated! This is blocking a production chatbot deployment.