Ty Lawson struggled to mesh with James Harden in Houston. (AP)

The Houston Rockets and guard Ty Lawson reached agreement on a contract buyout Tuesday, league sources told The Vertical.

Paperwork still needs to be processed to finalize the agreement, sources said.

After an initial apprehension to parting with Lawson after the NBA trade deadline, the Rockets will use the savings from the buyout to clear salary-cap space and likely sign another guard, league sources said.

The Rockets are 29-31, holding onto the eighth seed in the Western Conference by a half-game over Utah. Houston is $524,000 under the hard salary cap.

Lawson has no predetermined post-buyout destination, but would be eligible for a new team’s playoff roster because he met the league’s March 1 waiver deadline.

For Lawson, the experiment of co-existing with All-Star guard James Harden hasn’t worked this season. Lawson has carried himself as a professional throughout a difficult season, but simply has been unable to thrive with Harden, who is a ball-dominant scoring guard.

Lawson, 28, could be attractive to playoff teams searching for guard depth, or those out of the postseason race that’ll want to give him the chance at a test run for the future.

Lawson has averaged 5.8 points and 3.4 assists in 22.2 minutes a game this season. In his seven-year career, Lawson has averaged 13.3 points and 6.2 assists.

The Rockets made a trade with Denver to acquire Lawson in July.

More NBA coverage from The Vertical: