Reliever Sergio Romo and the San Francisco Giants have agreed toa $9 million, two-year contract, avoiding salary arbitration.