The Chicago Cubs have agreed to a deal with free-agent right-hander Kendall Graveman.

The 28-year-old Graveman, who is still rehabbing after having Tommy John surgery in late July, gets a one-year deal with a club option for 2020. According to multiple reports, the 2019 deal is for at least $575,000, and the second-year option is for $3 million.

The signing is mostly focused on 2020, but the Cubs have not ruled out Graveman returning late in the 2019 season, a source told ESPN's Jesse Rogers.

Graveman, who was the Opening Day starter for the Oakland Athletics, finished the season with a 1-5 record, 27 strikeouts and a 7.60 ERA in 34 1/3 innings.

He was 0-5 with an 8.89 ERA in his six starts before getting sent down to Triple-A Nashville on April 26. He returned on May 11, getting his only win of the season against the New York Yankees.

Overall, Graveman has started 78 games over the past four seasons with the A's, compiling a 23-29 record with a 4.38 ERA. He entered the majors as a late-season call-up with the Blue Jays in 2014.