Hi community,
I’m using the AI Tools Agent in an n8n workflow to manage a chat. Here’s my setup:
- I retrieve a question from a database using the
get_question
tool. This response includes apage_id
for the question. - The question is displayed in the chat, and the user provides an answer.
- I then save the user’s answer back to the database using the
save_answer
tool, which requires the samepage_id
.
Problem:
I need to persist the page_id
between interactions within the Window Buffer Memory
so the save_answer
tool can use it later. However, while Window Buffer Memory
retains the chat history, it doesn’t seem to store additional metadata like page_id
.
Questions:
- Can custom variables (like
page_id
) be stored inWindow Buffer Memory
when using the AI Tools Agent? - If not, what would be the best way to persist such values across interactions with the AI Tools Agent?
Any help or recommendations on how to handle this would be greatly appreciated. Thanks!