[NGRINDER-486]Support agent auto-update

Clean up codes