Cunningham agreed to a minor-league contract with the Pirates on Thursday, which includes an invitation to spring training, Adam Berry of MLB.com reports.
Cunningham split time between the Dodgers and Cardinals last season, hitting a combined .284/.404/.414 with four homers and seven stolen bases across 96 games at the Triple-A level. He's seen three brief major-league stints since 2013 but has failed to take advantage of his opportunities, turning in a .207/.256/.264 triple-slash across 67 career big-league games. He'll likely serve as organizational outfield depth in 2018.