In the HOST-RESOURCES-MIB there are variables that can tell you what kind of software is installed on a host (hrSWInstalled), and which date a particular application was installed an so on. These variables are named hrSWInstalled*.
But this does not seem to work on Gentoo:
% snmpwalk -v2c -c public localhost host.hrSWInstalled
HOST-RESOURCES-MIB::hrSWInstalledLastChange.0 = Timeticks: (0) 0:00:00.00
HOST-RESOURCES-MIB::hrSWInstalledLastUpdateTime.0 = Timeticks: (0) 0:00:00.00
Welp, I've done sone digging and as far as linux goes, only rpm based installs work (i.e. if librpm exists). If someone wants to hack up a C interface to the portage tree and plug it into agent/mibgroup/host/hr_swinst.c, by all means. I might do it if I'm really bored... But for now, this is unsolvable.