Trevor Story and the Boston Red Sox have agreed to a six-year, $140 million contract, sources confirmed to ESPN.

The deal includes an opt-out after the fourth season, sources said.