[1] set that AI uses player colors and setup
[2] go in single player and select your track, car and car setup
[3] join race - with your car
[4] add AI
[5] leave race - only your car, leave AI
[6] start race
Then an AI path generation process should take place. When it's done a *.knw file will be generated in some of LFS data folders and a race should start. I'm not sure what are the requirements for your layout, it has to have some basic references like start end and maybe something else, not sure.