Fixes #5579: Send reports from the agent to provide a heartbeat

This PR is a proposal to replace #563.
OK, fixed.