Free agent Ha-Seong Kim has agreed to a two-year contract with the Rays valued at $29 million, according to reports.