Here is a personal assistant for physical therapy clinics. I have given it a memory to recall patient information, and I am communicating with it as though it were a patient. I think Iroleplayed like it was the second message, and it’s re-reading the whole conversation. How do I stop that error?
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Hi @RichardCray Welcome to the community!
You can try increasing the max iteration in the AI agent’s option, if your workflow is suitable, this would work and deliver consistent output.
Since you mentioned roleplay/patient chat, I suspect the memory retrieval is repeatedly feeding the whole conversation back into the agent, causing recursive reasoning. The best fix is usually:
use short-term memory only
summarize old messages instead of passing the full chat each turn
@RichardCray re-reading happens because your memory node dumps the full chat history into context every turn. Swap to Window Buffer Memory with contextWindowLength: 5 so only the last 5 messages replay. Wire it into the AI Agent’s aimemory input alongside your OpenAI Chat Model node. Then add a systemMessage like “Respond only to the latest patient message, do not summarize prior turns” — that stops it re-analyzing previous turns.