both of these are slower than rg. ag has issues with big files, it's unreliable.
(Ack also supports the full PCRE syntax but that's less of an issue now rg has -P).
If your work takes you to minority platforms ack is certainly worth keeping in your toolbox.
I'm using ag inside my source directories and cannot remember it not doing the job.