Yes, your own spies will counterspy in your own cities. Diplomats in your own cities will prevent enemy diplomats from bribing you. Depending on the faction or the temperament of the current faction leader, I sometimes have one of each in every city I possess.