Error saveMessagetoMemory

[Error: HTTP error! status: 400 - {"error":"Memory is not initialized"}] when calling
await client.saveMessageToMemory()
await client.saveMessageToMemory()
from mastra client sdk
5 Replies
_roamin_
_roamin_3w ago
Hey @Rafik Belkadi ! It looks like you have not setup memory on the agent you're trying to save the messages to
Rafik Belkadi
Rafik BelkadiOP3w ago
i did setup memory on it actually i'll try again but pretty sure it's already set up
Rafik Belkadi
Rafik BelkadiOP3w ago
ye my bad i targeted the wrong env. but even if it succeeds, the message is not inserted in the db, why ? result array is empty, and i can't find it in my db
No description
Rafik Belkadi
Rafik BelkadiOP2w ago
also, how can i in the "memory" param with semantic recall only query the memory_messages that i have saved manually ? should i create a separate retriever tool ? @Romain
_roamin_
_roamin_2w ago
Hmm, that looks like a bug 🤔 Could you open a GH issue with a small repro example? Thanks 🙏 https://github.com/mastra-ai/mastra/issues
GitHub
mastra-ai/mastra
The TypeScript AI agent framework. ⚡ Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra

Did you find this page helpful?