My MacBook Air which is a year old has started shutting down suddenly. The screen sometimes goes blank although the keyboard is lit up, there is no response. I have to restart using the power button. The machine shuts down without any warning, the battery is charged, it doesn't heat up and there is no obvious pattern.
OK spavai, first step is to ensure that this is not a OS fault. Since you state that your keyboard remains active it is not actually shutting down but going into sleep mode.
As always with these steps it is wise to have a current full backup of your laptop first.
Go to Applications > Utilities > Disc Utility and open it. Select your Mac HD in the left column and Verify Permissions, if you find issues click Repair Permissions. Next Verify your HD, if there are problems you will be directed to restart using the Repair Partition and use **** Utility to repair the HD. After all that quit the Disc Utility and restart from the Apple Menu > Restart.
It is possible that you will find no problems other than a few Permission issues which commonly occur over time. So these measures may not fix your problem but as a process of elimination it confirms that everything else is working as it should.
There have been several posts regarding this issue with the 2013 MBA and I am beginning to suspect it is a generic problem but there is one more thing you should try before heading off to your local Apple Genius Bar.
Read and follow the instructions on this link for Mac Book without removable battery.
Resetting SMC (System Management Controller) on a Mac.
If all this fails to solve your problem I suggest you take it back to Apple.
Good luck and welcome to the forum.