A double agent is an agent in contact with two opposing intelligence services, only one of which is aware of the double contact or quasi-intelligence services.
For example, a double agent would be someone who is secretly working for both the CIA and the KGB.