@property
    def messages(self) -> List[BaseMessage]:  # type: ignore
        """Retrieve all session messages from DB"""
        message_blobs = self.blob_history.retrieve(
            self.session_id,
        )
        items = [json.loads(message_blob) for message_blob in message_blobs]
        messages = messages_from_dict(items)
        return messages
[docs]    def add_message(self, message: BaseMessage) -> None:
        """Write a message to the table"""
        self.blob_history.store(
            self.session_id, json.dumps(_message_to_dict(message)), self.ttl_seconds
        )
[docs]    def clear(self) -> None:
        """Clear session memory from DB"""
        self.blob_history.clear_session_id(self.session_id)