genkit/samples/js-schoolAgent at main · ...
I am basing it off of the js-schoolAgent example here: https://github.com/firebase/genkit/tree/main/samples/js-schoolAgent
But I want to call it in a firebase function: https://gist.github.com/seanaguinaga/6b80af51420e12188599c6973a73affd
I am not sure how to make it even persist the chat messages (which it does not, only the initial state)
It will persist them if you start the session with just a vanilla chat agent and not a prompt/multiagent setup: https://gist.github.com/seanaguinaga/e20d26815d9b50a4a9aa09c1987a9fdd
I can get the first message to work correctly
But it does not persist any messages or threads to firestore past the first interaction (it overwrites the main thread after each conversation)