Can you share a screenshot of the execution that fails? I have given your flow a quick go and it is telling me that a tool is needed with the AI Agent node so I am curious to know if the UI is telling you that you need a tool and maybe the conversational agent is the better option.
Hi @Jon ,
Am triggering it using @n8n/chat - npm
So basically when the page is loaded it sends out the below POST request with action “loadPreviousSession”, and this call fails in the n8n workflow as the sessionId passed in the POST is not outputed by the Chat Trigger node for the case when action is “loadPreviousSession”.
To replicate this, just add the below code to a html page, reload the page, open network tab, open the chat icon, you will observe the call being made to load previous chat history fails:
Hi @Roney_Dsilva, I just looked into this, and it seems related to connecting the memory node to both the agent and the chat trigger. If you use an expression for getting the session id, this will not work well for the memory buffer in the chat trigger. Can you try to use two separate memory buffer nodes, where the chat trigger one uses the “take from previous node” mode? That should hopefully resolve your issue.