What if we cannot reach an agreement in mediation?

You might only reach a partial agreement or an agreement on only some issues. That is okay. It is still progress and is one less problem that will need to get decided in court.  It is also possible that no agreement is ultimately reached.  If nothing else, you will have still probably gained insight into what specifically each of you wants, with clarity that might help you to eventually reach a settlement, perhaps with the assistance of your attorneys.