Can't get mastra + copilotkit memory to work
No matter how I try, I cannot get messages to be saved across sessions. If I refresh the page, it starts a new chat with new memory every single time. I've tried to fix this for hours, reading all docs. Here's some of the code used:
7 Replies
๐ Created GitHub issue: https://github.com/mastra-ai/mastra/issues/10816
๐ If you're experiencing an error, please provide a minimal reproducible example whenever possible to help us resolve it quickly.
๐ Thank you for helping us improve Mastra!
what versions of things are you running
https://github.com/ag-ui-protocol/ag-ui/blob/main/integrations/mastra/typescript/src/copilotkit.ts
Resource ID is not being propagated down to the agent on the ag-ui side
GitHub
ag-ui/integrations/mastra/typescript/src/copilotkit.ts at main ยท a...
AG-UI: the Agent-User Interaction Protocol. Bring Agents into Frontend Applications. - ag-ui-protocol/ag-ui
I think we should open this issue in #mastra-copilotkit
or @Tyler can maybe help
alright, but it should be possible to do, its just that I have just made a mistake? Or is this a bug
Yes ofcourse if resourceId made it to the agent properly all would work!
But setting runtime context like you did does not magically set the resourceId down to the agent
In Mastra v1.0.0 there are reserved keys you can use in context
mastra__resourceId which would allow this to work Lukas
I believe this version of ag-ui is compatible with v1.0.0-beta
https://www.npmjs.com/package/@ag-ui/mastra/v/0.2.1-beta.1