Acting United Nations envoy Stephanie Williams said the ceasefire would start immediately and all foreign fighters must quit Libya within three months.
As a first commercial passenger flight in more than a year crossed frontlines from Tripoli to land in the eastern city of Benghazi on Friday,
Tunisia is set to host talks in early November including representatives of civil society, tribesmen, political leaders, and members of bodies representing both administrations.
"There is a need for increased search and rescue capacity on the Mediterranean, including NGO vessels, in order to increase the likelihood of rescue operations leading to disembarkations in safe ports outside of Libya."
Russia has been accused of sending several thousand mercenaries from private Russian security company Wagner to support Haftar, accusations the Kremlin denies.