Details on The Custody Agreement Melo & LaLa Are Working Out Before Divorce

Sometimes we forget there are kids involved in a lot of the celebrity breakups and that is really the most important part the adults need to figure out.

Seems like LaLa and Melo understand that.

Carmelo Anthony and La La are hashing out a temporary custody agreement in which she will get primary custody of their son … TMZ has learned.

Sources close to the former couple tell us 10-year-old Kiyan will live with La La in NYC, but Melo has a totally open line of communication and will able to spend time with his son as much as he’d like.

We’re told the 2 believe they can work out all the details without going to court … it being done with their lawyers.

Flip the page for the woman Melo allegedly cheated on LaLa with…