O'Brien was recalled from the Senators' AHL affiliate in February and became a reliable player for Ottawa head coach Paul MacLean.
The 23-year-old had three goals and three assists in 28 games and one assist in the playoffs. The Maplewood, Minn., native was the Senators' first-round pick (29th overall) in 2007.
Gryba's deal, meanwhile, is a two-way contract. The Saskatoon native spent all of last season in the AHL, where recorded five goals, 15 assists and 98 penalty minutes in 73 games.
The 24-year-old was Senators' third-round pick (68th overall) in 2006.