AI Agent Issue: Vector Storage vs Chat Memory Conflict

I’m facing a critical problem with my AI agent setup. When chat memory is disabled, my agent correctly pulls knowledge from the vector database. However, with chat memory enabled, the behavior becomes inconsistent - sometimes it uses the vector storage, sometimes it relies on outdated chat memory.

This creates a major issue: if a user asked something a year ago and the information has since been updated in the vector database, the agent often uses the old chat memory response instead of the current, accurate data from the vector store.

What I want: Chat memory should only provide historical conversation context, while the vector database remains the primary knowledge source.

What I’ve tried: Added system prompt instructions telling the agent to acknowledge when users have asked similar questions before, but it completely ignores these instructions.

The core problem: Chat memory and vector database aren’t working in harmony. The agent sometimes treats chat memory as the primary knowledge base instead of just conversation history.

Has anyone experienced similar issues with chat memory interfering with vector database retrieval? Looking for solutions to prioritize vector storage while maintaining conversation context.

In general I have the problem that the usage of the vector storage or any other data from the tools is way too random and he sometimes uses them and sometimes doesnt

Information on your n8n setup

  • n8n version: 1.95
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own Main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): GCP Self Host Docker
  • Operating system: Windows 11