@cyan: Do you have a preference in language?
Probably your best bet is to find an XMPP bot in your language du jour, and since AIM introduced jabber compatibilities earlier this year, you’ll get that for free… plus, you’ll get other protocals that have gateways as well.
Fluther, for example, uses (or rather, used to use and will soon use again) an XMPP bot written in python built on Twisted.