The Pirates also designated infielder Ray Olmedo for assignment.
Kim, expected to join the team Monday, could earn up to $1.15 million in performance bonuses based on games pitched. His deal guarantees him $300,000.
General manager Neal Huntington said the 29-year-old Kim will be used exclusively in relief. Last season, 22 of his 28 appearances with Colorado, Florida and Arizona were starts. He went 10-8 with a 6.08 ERA.
"He has been tough on right-handers when he pitched primarily as a reliever," Huntington said. "Kim adds an experienced option for us in our bullpen competition."
The Pirates hope to keep Olmedo if he clears waivers. Olmedo, a waiver claim last month from the Toronto Blue Jays, had been one of 13 infielders in camp.