Agreements made in mediation are not legally binding.  You will need to take any Memorandum of Understanding to your own solicitor who will advise on its terms and, if appropriate, will draft a consent order to put before the court for approval by a judge.