Renaissance Venice guarded its secrets even from its own doge
Venice lived by trade, and trade secrets were worth protecting at almost any cost. Its security body, the Council of Ten, would not let even the doge browse government archives freely. In 1481 it banned all officials from contact with foreigners and ambassadors, and leaking state secrets could bring a death sentence.
Spying is ancient. The oldest known classified document is a report from an agent posing as a diplomatic envoy at the court of Hammurabi, who died around 1750 BC. Egypt ran an organised secret service, and spies appear in the Iliad, the Bible and the Amarna letters. The Art of War and the Arthashastra first argued that intelligence is central to war and peace alike; Sun Tzu's treatise names five kinds of spy, from local informants and turned defectors to doomed agents sent to spread false stories.
Western spycraft changed in the Renaissance, when Italian city-states began stationing resident ambassadors in foreign capitals to gather information. Elizabeth I's secretary Francis Walsingham ran England's intelligence, and the novelist Daniel Defoe both spied for the British government and sketched a theory of surveillance anticipating police-state methods. During the American Revolution, Nathan Hale and Benedict Arnold became famous spies, while George Washington acted as the young nation's first spymaster.
Agencies differ in taste. The Soviet Union preferred human sources to open research and judged its KGB and GRU officers by how many agents they recruited, while the United States leaned toward technology such as signals interception and imagery. Agents are usually specialists able to tell valuable material from routine paperwork; those after economic secrets may be recruited from universities and businesses, and those gauging public mood from journalists and exchange students.
Strictly, espionage is narrower than intelligence gathering. In American usage it is a particular form of human intelligence: the passing of classified information to someone not cleared to receive it. Codebreaking, satellite photography and analysis of public sources are all intelligence work, yet none counts as espionage, and neither do prisoner interrogations or diplomats' reports. Most spying requires reaching the place where secrets are kept or the people who know them, though the American mole Robert Hanssen famously refused ever to meet his buyers.
Source: Espionage