The National Basketball Association and its players union have tentatively agreed to terms on a new seven-year labor agreement, according to people familiar with the talks.