Yes, you can also send agents with your armies to protect generals in the field from being bribed, assassinated, etc. The more spies you have in a city or with an army, the lower the chance the enemy has of making missions against you.