If we reach an agreement is it legally binding?

Yes, if mediation concludes successfully, you and the other party will sign an agreement that will then be filed with the court.