added api for checking agent availability