The 35-year-old Smith spent the last two seasons with the Astros and is 6-1 with a 3.06 ERA in 84 appearances for Houston. Smith missed the beginning of last season recovering from Achilles tendon surgery before returning in July and posting a 1.80 ERA in 28 regular-season appearances.
Smith didn't allow a run in eight of his 10 postseason appearances in 2019 and finished the playoffs with a 3.12 ERA.
The right-hander has a 2.98 ERA in 782 career appearances. He gets $4 million in each season under the deal announced Monday.
He was coming off a $15 million, two-year deal with the Astros.