You can apply for smart DL immediately after passing the driving test. You will be required to login to your NTSA TIMS account and apply online as provided in the procedure linked below. Once you have made your application, go for biometrics taking and wait for smart DL to be ready for collection in about 2 to 3 weeks.
Ksh. 3100 is required to apply for Smart DL
Procedure: How to apply for smart DL.