An AI that’s a better friend — and maybe a lifeline for humanity