I don't know how Smith and the Robot came into the picture, they weren't in the original pilot reel. Jonathan Harris' constant "Special Guest Star" billing in the main title, for the entire run, must have been orchestrated by a brilliant agent. At the time, the only thing I recognized Harris from was his hotel manager role on The Bill Dana Show.
Before Lost in Space ever arrived though, there was a Gold Key comic book around for a couple of years called Space Family Robinson. They were not the characters of the tv show, but there was a mom and dad and two kids. After the series appeared, some sort of arrangement was made, as the comic was rebranded as Space Family Robinson: LOST IN SPACE, though it still wasn't about the tv show.
Did Ib Melchior have a hand in the comic? I know from a dedicated Allen fan who corresponded with Ib that he had developed a whole Space Family Robinson concept in the early 60s which he claimed Allen appropriated wholesale. It may be that one of those super-researched limited press books about LiS might have info on this.