What is mediaremoteagent under Activity Monitor?

mediaremoteagent is /System/Library/PrivateFrameworks/MediaRemote.framework/Support/mediaremoteagent

The MediaRemote framework is used for managing unified media playback across macOS, determining which app is playing media and allowing you to control the media playback using macOS. For example, supporting the Now Playing widget in Notification Center, or the play/pause/skip keys on the keyboard.

The same framework is used on iOS, for features like Control Center playback controls. http://iphonedevwiki.net/index.php/MediaRemote.framework