How to make earthquake and tsunami early warning faster? We designed an AI algorithm that estimates almost instantaneously the magnitude of an ongoing earthquake from a recently identified signal. This signal is a perturbation of the gravity field (that we call PEGS, for Prompt Elasto-gravity signal) induced by the seismic rupture and is extremely weak (about one million times smaller than seismic waves). However it has the extraordinary property to propagate at the speed of light (much faster than seismic waves). As a result, our algorithm, PEGSNet, can track almost instantaneously the magnitude of large (Magnitude ≥ 8.3) earthquakes (Licciardi et al., Nature , 2022):