Updating agent to use the mon-client api