Undercover agent noun
– (military) a secret agent hired by a state to obtain information about its enemies or by a business to obtain industrial secrets from competitors.
and undercover agent
are semantically related. Sometimes you can use "Informant" instead a noun
phrase "Undercover agent".