To work correctly, the circuit would need a jumper between the mains N terminal and AGND.
You're operating the energy meter chip without isolation from mains voltage. So all circuit parts connected to it, e.g. the microcontroller are carrying 230V mains voltage. They must not be touched and can't be connected to other equipment (oscilloscope, computer) without respective isolation. Alternatively, the mains connection can be made through a safety transformer for test purposes.
But I don't know what's your isolation concept for the energy meter. It's a basic project question, that should be answered at the very beginning.