The manual is very confusing with it’s description of “Agents” for spying and “Counter-Agents” for defensive purposes. Forget all that, because the game simply uses “Spies” for spying and “Agents” for defensive use. When you train/produce a spy (only one generic type) at your colony, it is automatically placed into defensive duty as an “Agent”. You can see the newly trained defensive “Agent” by looking in the bottom-right of the Races Screen. Keep them here if their purpose is for empire-wide defensive measures. If you would like to assign that “Agent” to spying in a specific enemy empire, click on him or a group of them to “pick them up” then drop them in the box above the words “Hide-Espionage-Sabotage“ in the enemy empire you wish to spy on, your "Agent" has now become a "Spy". Also, remember to click on the spies mission “Hide-Espionage-Sabotage” you wish your “Spy or Spies” to perform in that empire.
That’s it, hope it helps. The manual is pretty good otherwise but the “Agents / Counter-Agents” thing always confusses new players.