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

This PR is a proposal to replace #563.
I tried also with if_ok rather than aways, and again, the parser defines the classe