def get_sessions(self) -> list:
        """Get all sessions.

        :return: List of all sessions.
        :rtype: list
        """
        self.cursor.execute("SELECT * FROM sessions ORDER BY updated_at DESC")
        row = self.cursor.fetchall()
        sessions = [dict(r) for r in row]
        for s in sessions:
            s["metadata"] = json.loads(s["metadata"])
        return sessions
Get all sessions.

        :return: List of all sessions.
        :rtype: list
        
backend/director/db/sqlite/db.py