The art of spying is almost as old as the practice of warfare itself. The obtaining of information has always been a critical factor in being able to gain victory over one’s enemies. More information meant better chances of defeating the enemy, and so leaders have employed spies for ages. Sometimes these individuals were trained specifically for their tasks, while at other times they were lured from the enemy with promises of power and wealth, or with threats. The first evidence of espionage being used comes from around 6000 years ago, when Egyptians used internal security forces to ensure that their subjects - particularly those in powerful positions - remained loyal. Later they would use similar methods to seek out weaknesses in their enemies. Even the Bible has its tales of spies being employed to gather intelligence, such as before the legendary battle of Jericho.
Some of the earliest handbooks on spying and using spies are truly ancient. Sun-Tzu wrote his world-famous book The Art of War sometime during the 5th to 3rd centuries BCE. India’s Chanakya recorded his own theories of espionage during the 4th century BCE. Both thoroughly believed that spies were a necessary tool in war that no leader could afford to overlook if he hoped to be successful.
Often, spies were people of seemingly innocent roles. During times of peace merchants, diplomats, consorts, scholars and even royal advisors could be working for either side of a potential conflict. People in these roles were chosen both for the uniquely sensitive positions they held as well as for practical reasons - they were often the only ones who could read or write. Kings and rulers knew that visiting emissaries of their rivals were often spies, though could do little about it without openly declaring war. And besides, there was always a chance of out-spying a spy and learning more about your enemy, assuming you were clever enough.
Some of the earliest espionage techniques consisted of things such as using codes to disguise messages, poisoning enemies in important positions, sabotage of vital resources and feeding the enemy disinformation through false sources. Sometimes these false sources did not even know they were being used as spies, though they often suffered the same fate that spies did when discovered - death.
By the time of the Roman Empire, spying was commonplace and extensive. Complex networks were established to keep enemies subverted and allies loyal. As the years moved on, espionage practices moved from region to region and new innovations developed to improve upon old methods. Still, the essentials have remained much the same over the centuries, in goal and in technique. Much of what spies do in the modern age is little more than what was thought up thousands of years ago, but with newer technologies attached.