Patch Changes
-
#820
c5e0c89Thanks @omeraplak! - feat: expose createdAt in memory.getMessagesWhat Changed
The
createdAttimestamp is now exposed in themetadataobject of messages retrieved viamemory.getMessages(). This ensures that the creation time of messages is accessible across all storage adapters (InMemory,Supabase,LibSQL,PostgreSQL).Usage
You can now access the
createdAttimestamp from the message metadata:const messages = await memory.getMessages(userId, conversationId); messages.forEach((message) => { console.log(`Message ID: ${message.id}`); console.log(`Created At: ${message.metadata?.createdAt}`); });
This change aligns the behavior of all storage adapters and ensures consistent access to message timestamps.