Free agent infielder Luis Arraez and the San Francisco Giants have agreed to a $12 million, one-year contract, according to a person with knowledge of the negotiations.