Memory

Get session memory

GET
Returns a memory (latest summary, list of messages and facts for models.MemoryTypePerpetual) for a given session

Path parameters

sessionIdstringRequired
The ID of the session for which to retrieve memory.

Query parameters

memoryTypeenumOptional

The type of memory to retrieve: perpetual, summary_retriever, or message_window. Defaults to perpetual.

Allowed values: perpetualsummary_retrievermessage_window
lastnintegerOptional
The number of most recent memory entries to retrieve.
minRatingdoubleOptional
The minimum rating by which to filter facts

Response

This endpoint returns an object
facts
list of stringsOptional

Most recent list of facts derived from the session. Included only with perpetual memory type. Deprecated: Facts will be deprecated in future releases and relevant_facts should be used instead.

messages
list of objectsOptional
A list of message objects, where each message contains a role and content.
metadata
map from strings to anyOptional
A dictionary containing metadata associated with the memory.
relevant_facts
list of objectsOptional
relevant_summaries
list of objectsOptional
Summary list result from Summary Retriever Memory Type.
summary
objectOptional
A Summary object.

Errors