I’m running into an issue with my AI agents. In my workflow I have two different AI agents,
AI Assistant (handles conversations with leads and books calls) [Lets call it Agent 1]
AI Summarizer (summarizes chat history to provide team member summary of the conversation) [Lets call it Agent 2]
I’m using supabase/postgres to store the chat history. The AI Agent Memory is using Postgres.
The issue is that both agents are linked to the same chat memory and Agent 2’s user message + output is being stored in the chat memory. Then we run into problems where Agent 1 will message the lead their summary by mistake since its reading the prompts from Agent 2.
My questions are:
Is it possible to read the memory but prevent it to adding to it?
Or can I attach two different memories 1 for reading, and 1 for writing?
If that’s not possible I was thinking should I pull the chat memory in a different node, and feed it to the AI summary agent and not link it to memory directly? Think that would work?
i cant see the whole workflow logic but yes i think (also notice there are 2 branches in AI summary node, you will need a merge node), also as you mentioned in your case, you want to read the memory but not add to it.
So I think you need to add it somewhere after (agent 1), then configure it with the correct key mapping to get the messages you need, and then do your summarization (agent 2)
So the whole idea is that you’ve separated the memory from the first agent and the second agent.
In other words, there isn’t really a second agent, you’re just reading the memory from the first agent, then summarizing that messages, this process has nothing to do with the first agent itself..