Restore label in sendAgentMessage and adapt message parsing keeping backwards compatibility