Added code to subscribe to Agent notifications