When do you file a seperation Agreement?

I plan on moving out of our home and taking both children with me because he refuses to leave and causing a lot of stress on both me and the kids, at what point do I file a seperation agreement with the court? And is this a one sided agreement for custody and the rest has to be agreed by both parties? I’m just not clear how that works or when.

Separation agreements are not filed with the court. They are agreements which spell out the provisions of a settlement which both parties have agreed to. Before your leave the home with your children I strongly suggest you meet with a lawyer to create a plan of action.