How to add memory to AI node when the input is not chatinput?

I’m using some JSON response as the input for my “AI Agent” node. But the memory connector of that node is not working.

This is leading to errors in AI output, not intended outputs even after setting the system message, the AI model is ignoring the system message and giving intended response, which is impacting rest of the following nodes.

I have tried “MongoDB Chat Memory”, and still the same.

Screenshot of the memory branch:

Information on your n8n setup

  • n8n version: 1.104.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Ubuntu 24.04.2 LTS

Hey @Urvi_Patel hope all is good. Welcome to the community.

So I assume when you remove the memory node, everything (except remembering context) works fine?

when removing the memory node, for each incoming it’s giving outputs in diff format IGNORING THE SYSTEM PROMPT.

I believe adding memory node could fix this. But unable to figure out how to implement the memory node.

Hmm… memory is not for ensuring output format. Ensuring output format is for ensuring output format :slight_smile:. This is something you would instruct the LLM in the prompt.

Unless I wildly misunderstood you that is, ofc

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.