Not all queries use regex, therefore not all queries can generate back-references. The only difference, relating to an agent, is the context of where the regular expression (regex) is input.
The more general issue of back-references is discussed under using regular expression back-references.