Bot Sentry is a Pidgin (libpurple) plugin to prevent Instant Message (IM) spam. It allows you to ignore IMs unless the sender is in your Buddy List, the sender is in your Allow List, or the sender correctly answers a question you have predefined.
JIB - Java IM Bot, aimed to built a pluggable,
customizable, expandable and dynamic bot framework for
instant messager. With JIB user can control remote IM Bots over web based interface, configure bots to perform various tasks or custom behavior.