The court always retains jurisdiction over matters regarding the children. The agreement can include terms regarding the children, but the court will ultimately determine what is in the best interests of the children at the time of separation.