The 49ers have agreed to trade quarterback Alex Smith to the Kansas City Chiefs for a pair of draft picks, sources tell Mercury News