There are several hardware AGC schemes available on the files section of this group and on the net.? Which is best?
There is not enough computing in the Nano to implement a spectrum analyzer.
Look in this group's files section for CAT implementations, as a starting point.