How often should you open the door? Optimal monitoring to screen heterogeneous agents