Xmppbot is a project mainly written in Erlang, it's free.
a xmpp bot written in erlang
Using exmpp and erlotr (http://github.com/sg2342/erlotr), which should be somewhere in the erlang path.