libpurple is intended to be the core of an IM program. Pidgin is a GTK+ frontend to libpurple, and Finch is an ncurses frontend built using libgnt (GLib Ncurses Toolkit).