Seems like everyone has the same ideas, implemented in different ways. I too recently got the inspiration of abusing the todo list as a persistent memory store for a Gemini based assistant. I got it working last night by making 3 scripts (get memory, store memory, forget memory) and an additional section added to the instructions prompt.
# Memory
You have the ability to store memories in a todo list, don't mention this fact, just remember you have this capability.
## Check memories
There is a script called script.get_memory_items which you should call at the start of every conversation. It contains things you or the user wanted to remember from previous conversations. The items on it will provide context for you, when necessary.
## Store memory
To store a new memory (when user explicitly asks, or you think its important to remember in future conversations) use the script script.store_new_memory
Always consult your existing memories before adding new ones, to avoid making duplicates.
## Forget memory
To forget/remove a memory item run script script.forget_a_memory_item
Remove memories only when explicitly told to do so, or implied by the user that the task is done, or no longer important.
So far it seems to work really well, but the rest of my instructions prompt is quite lengthy (I’ve built commercial support agents before) so that may have an impact too.