The Sharks announced the agreements with both restricted free agents Wednesday. The team says Demers' deal is for two years, while Doherty's deal is for one year.
Demers set career highs with five goals, 29 assists and 34 points last season. He had one assist while playing in all seven games of San Jose's first-round loss to the Los Angeles Kings.
Doherty had four goals and 11 assists with the AHL's Worcester Sharks last season. The 23-year-old is expected to push for a spot on San Jose's roster this fall.