SAN FRANCISCO - Infielder Joaquin Arias has agreed to a $2.6 million, two-year contract with the San Francisco Giants to avoid salary arbitration.