GenkitG
Genkit11mo ago
1 reply
dual-salmon

genkit/samples/js-schoolAgent at main · ...

I can't seem to get a multi-agent set up to store or restore messages?

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)
GitHub
An open source framework for building AI-powered apps with familiar code-centric patterns. Genkit makes it easy to develop, integrate, and test AI features with observability and evaluations. Genki...
genkit/samples/js-schoolAgent at main · firebase/genkit
Gist
GitHub Gist: instantly share code, notes, and snippets.
onCallGenkit.ts
Gist
GitHub Gist: instantly share code, notes, and snippets.
simpleChat.ts
Was this page helpful?