added functionality to query agents in interface