HOUSTON -- The Houston Texans have agreed to terms with slot receiver Randall Cobb on a three-year, $27 million contract that includes $18.75 million in guarantees, a source confirmed to ESPN's Todd Archer on Monday.

The news was first reported by NFL Network.

Earlier in the day, the Texans traded away All-Pro wide receiver DeAndre Hopkins and a fourth-round pick to the Arizona Cardinals for running back David Johnson and a second- and fourth-round pick. With Hopkins gone, Will Fuller, Kenny Stills and Cobb are the Texans' top three wide receivers.

Cobb will not replace Hopkins, but he will provide a reliable target for Deshaun Watson in the slot. The Texans drafted slot receiver Keke Coutee in 2018, but after getting off to a fast start in his rookie season, he has struggled. Coutee was a healthy scratch for several games last season and is now not a lock to make the roster in 2020.

In his only season with the Cowboys, Cobb caught 55 passes for 828 yards and three touchdowns, becoming a valuable asset for Dak Prescott, who finished second in the league with 4,902 passing yards.

Cobb's average of 15.1 yards per catch was a career high, and he recorded back-to-back 100-yard games -- something he had not done since 2014 -- against the Minnesota Vikings and Detroit Lions.

Cobb, who turns 30 in August, signed a one-year, $5 million contract with the Cowboys as a free agent last offseason. He spent his first eight seasons with the Green Bay Packers, catching 470 passes for 5,524 yards and 41 touchdowns.

In his 2014 rookie season, Cobb had 91 receptions for 1,287 yards and 12 touchdowns. However, he played only one 16-game season for the Packers after that because of injury problems. He missed just one game last season for the Cowboys.

ESPN's Todd Archer contributed to this report.