The San Francisco 49ers have agreed to trade quarterback Alex Smith to the Kansas City Chiefs, a league source confirmed to ESPN.com's John Clayton.