The San Francisco 49ers agreed to a five-year contract extension with linebacker NaVorro Bowman that will tie him to the team through the 2018 season, the team announced Tuesday.