Whenever, in the opinion of the auditor general or attorney general, the interests of the commonwealth require it, they or either of them shall have power to employ the services of resident attorneys, to assist in the prosecution and trial of causes and the prosecution of claims, for which services such reasonable compensation as the circumstances will justify, or as may have been agreed upon, shall be allowed by the auditor general.
72 P.S. § 4032