http: check if self.agent actually exists