Overview
A foreign agent is any person or entity actively carrying out the interests of a foreign principal while located in another host country, generally outside the protections offered to those working in their official capacity for a diplomatic mission.
Foreign agents may be citizens of the host country. In contemporary English, the term has a generally pejorative connotation. A covert foreign agent, also known as a secret agent of a foreign government, may in some countries be presumed to be engaging in espionage.
Legality
Some countries have formal procedures to legalize the activities of foreign agents acting overtly. Laws covering foreign agents vary widely from country to country, and selective enforcement may prevail within countries, based on perceived national interest.
United States
From Wikipedia (CC BY-SA 4.0).