Agent chat improvements Fix #628, Fix #636

Also better compatibilty with xen domU