KANSAS CITY, Mo. (AP) Right-hander Wily Peralta and the Kansas City Royals have agreed to a one-year contract worth $1,525,000, a deal that includes a club option for 2019.

The 28-year-old gets a $1.5 million salary next year and the chance to earn $1.25 million annually in performance bonuses. The option is for $3 million with a $25,000 buyout. If the Royals decline the option, he would be eligible for salary arbitration.

Peralta went 5-4 with a 7.85 ERA in 19 appearances for Milwaukee this year and was designated for assignment in July. He is 47-52 with a 4.88 ERA over his six-year big league career, all with the Brewers. His best season was 2014, when he went 17-11 with a 3.53 ERA as a starter.