For becoming a RAW agent first you have to be selected for a good government position like IAS, or IPS.