I put in place financial agreement once we sold our marital home (not what I wanted) because I knew that ex is unstable financially ( still is to this day) and I wanted to protect my kids and myself. Best decision I have ever made.
You need to be secure financially for your kids.