I want to setup a Make.com AI Agent with a session managing module. The main goal is to have it terminate the session when the chat hasn’t been active in 5 minutes or when the person types “start over”
What is the problem & what have you tried?
I don’t know how to do it and I can’t find a way to get the session manager working. I can’t seem to find a solution to this. What I’ve done so far is that I put on the thread ID the Id of the contact plus today’s date, so every day it creates a new chat. What I really want is what I described on above’s paragraph
Error messages or input/output bundles
I am not getting any error message. This is something I want to set up
You’ll probably need a Data Store to “save” the user’s last message time, and then at the start of the scenario (after the trigger module), use a module to “load” the user’s last message time from their contact ID.
Have you seen these previous discussions?
Your question may have already been answered here:
If the previous threads above does not answer your question, please edit your question and provide additional details to demonstrate the difference between your question and the duplicate discussions.
If you require help implementing the answers in the previous threads linked above, please reply with more details of what you have tried, including screenshots.
It’s different from what I’ve seen here. I want to change the Thread ID given one of these two conditions:
User says “Start over“
User does not chat for 5 minutes
I made a solution on the screenshot I shared that basically what it does is that it creates a new thread ID for the same user every day, but that’s a provisional solution.
I haven’t seen anybody creating this here, and I don’t know how is this achievable
So the main module I want to set up is this one. The other ones are because users have a limit os usage on this bot, but that’s something I manage on another scenario. The main problem I want to solve is to always have the same thread ID for a single user, then change it if the person types “Start over“ or the chat session closes (user doesn’t type within 5 minutes or something like that)
@Gonzalo_Zerpa You need some sort of Data Store (Airtable/Google Sheets) for this so you can search IDs then route for no record, record exists, and or other. Pass thread and so on. I hope this helps you!
I know it’s possible with data stores and so, but I don’t know like what’s the standard. I can imagine a way to do this, but I really don’t know if that’s like the actual solution or if someone has already done that before
So the other posts that were quoted on this post don’t solve the problem I’m trying to solve: all of them solve the continuity issue, where the AI is capable of getting past message from a single chat and doesn’t get stuck on the first message.
The problem I was trying to solve was this one: when given a condition, even if it’s the same user who is typing, start a new Thread (let’s say a new chat with the AI). This would allow to optimize the token usage, because you don’t want the AI remembering the last 100 messages sent.
For a simple Q&A chatbot it doesn’t matter, but when the Agent you are building is going to be used several times by the same user, even daily, you wouldn’t want it to remember all the past executions, only the ones on the current chat.
So this was my solution: create a session adminsitrator using Make.com’s datastore:
So in the end the solution was to assign a new thread ID when the conditions are met. It works the same for every condition, so if someone wants to use this, they just have to change the first condition block
Excellent! The use the the Data Store is definitely the “best practice” way, as it reduces the lag/response time due to it being on Make’s servers. I’m glad you managed to come up with that solution that suits your use-case.
That flowchart looks amazing, may I ask which software you used to create the diagram?