Since youāre on Botpress Cloud, that explains it. In the cloud version, the SummaryAgent hook always runs after the workflow ends, so you canāt control exactly when it triggers. Thatās why even if your āBefore Conversation Endsā flow clears variables, the SummaryAgent still summarizes before your reset happens.
A good workaround is to clear everything at the start of a new conversation instead in your āOn Conversation Startā workflow, just add a code card that resets conversation.SummaryAgent. That guarantees each new chat starts fresh, regardless of what happened last session.
Iāve implemented this setup for other cloud bots before I can DM you the exact code snippet and steps to make it work smoothly if youād like?