Memory functionality missing from OpenAI Assistant node

Hey, I’ve been playing around with n8n-ai using the Assistant node. You can select a new or existing Assistant from your OpenAI account, however it doesn’t have a way to remember conversations.
I’m using n8n’s official chat front-end (https://cdn.jsdelivr.net/npm/@n8n/chat/chat.bundle.es.js), as I wanted to implement this on a 3rd party site.

I could use the AI agent, which has a memory, but it doesn’t support document retrieval.

So in a nutshell, how do I use an agent that’s capable of “retrieval” and “chat memory” at the same time?

  • n8n version:1.19.0 ai beta
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): not sure what this is
  • Running n8n via (Docker, npm, n8n cloud, desktop app): via docker on ubuntu host
  • Operating system: ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

I second this - memory key to keep threads separate (thus acting more like a chat agent) is killer feature here.

  • n8n version:1.19.0 ai beta
  • Database (default: SQLite): default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): via docker on ubuntu host
  • **Operating system: ubuntu
2 Likes

Just for context, what I tried is using a normal chat agent that can use an assistant as an “external tool” to have access to files.
That way I had both memory and file access. However, this didn’t work, because for some unknown reason the main chat agent kept on calling multiple times the assistant agent with empty requests, or called it multiple times when it didn’t get the expected response.
It’s like trying to control 2 kids lol…

That is a good spot and sounds like a good feature request, I have moved this over to the feature request topic don’t forget to give it a vote.

2 Likes

Hello, any update on this ? I am also looking fr this feature

Hey @LucBerge,

No update yet but as soon as we have one we will post on here

1 Like

It would be great! Thanks and waiting for your post :wink:

It would definitely be a great feature. I am trying to achieve this using multiple HTTP requests to the OpenAI API but the API itself is buggy (it will not always process multiple messages sent to the queue) and this makes the hole thing very complex, with lots of checks and loops, and the workflow becomes a mess. At least in my case since I use very complex Assistants using GPT4 model that do a very very specific task.

At this moment the available node in N8N will execute a different thread on each message, and currently OpenAI Assistants using GPT4 model are buggy too, they need ‘training’, so as soon as I start a new thread, the Assistant makes terrible mistakes.

If I could make the node use same the thread ID that would be enough feature to enable memory.

Cristian - We achieved this by doing Http requests to the assistants API - We have tested this with 1000s of requests and looks solid.


same

Yes that’s how I do it, with the small difference that after the Node ‘Check Run Status’ if it is false I have a Wait Node to avoid hammering the API. If you look in OpenAI Playground, they too run the ‘Check Run’ at approx. 3 seconds interval.

But also in my case I ask the AI to generate a very specific information, and to be able to differentiate each type of information that the AI generates, I must send 9 different messages. The theory says that I can add each message to the queue and just Run once the Assistant. The problem is that the API will 80% of the times process only the first message in the queue, the other 8 are simply ignored.
So I have to do a Run Assistant for each message, wait for each reply, check for error responses, store the data, and this makes the Workflow a bit more complex.
If I could use the currently available Node in N8N for OpenAI Assistant using always the same Thread it would make the Workflow a lot cleaner.

1 Like

there was an assistant update recently added to the openai node but ive not played with it much

I voted for sure.

Any idea if message threads is now supported?