The Giants have agreed to a two-year deal with starting pitcher Ryan Vogelsong that includes a one-year club option.