© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
How to dictate assistant message ID when using Agent + Memory? - Mastra
M
Mastra
•
5mo ago
•
5 replies
Ariel Weinberger
How to dictate assistant message ID when using Agent + Memory?
We have a use case where we need to persist some data after generation in our DB
, and want to associate it with the assistant message ID
.
It would be best if we could dictate that ID to begin with
. But it would be okay if we could also just retrieve it from
agent.stream
agent.stream
. We
're on
0.21.0
0.21.0
.
Using
generateMessageId
generateMessageId
does not seem to work for persistence
. I could not find a Memory class property that does this either
.
We
're using the Postgres storage layer for Memory
.
Mastra
Join
The TypeScript Agent FrameworkFrom the team that brought you Gatsby: prototype and productionize AI features with a modern JavaScript stack.
5,321
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Duplicate Assistant Messages with agent.network() + Memory
M
Mastra / help-bugs-problems
5mo ago
save message to memory
M
Mastra / help-bugs-problems
5mo ago
Message id missing in onFinish callback passed to agent.stream
M
Mastra / help-bugs-problems
3mo ago