AGC which tells you what gain its at?
The approach that springs to mind is to input a small high frequency sine on top of your regular input signal, band pass to find out how big it is, and then high pass to get rid of it.  It means you can't low pass at your amplifier, but it's fairly straightforward.