Terms of the agreement, which is pending a physical, are not yet known.
Alvarez, 30, hasn't pitched in the majors since 2017 with the Philadelphia Phillies. He appeared in 24 games for the Washington Nationals' Triple-A affiliate in 2019, posting a 1-4 record with a 5.94 ERA.
The Venezuelan pitched for the Milwaukee Milkmen of the American Association before the reported signing with the Pirates.
Alvarez was an All-Star and finished 12th in NL Cy Young voting in 2014 after posting a 2.65 ERA across 30 starts for the Miami Marlins.