Envoys of six parties and five activists said their Algiers declaration, after two days of talks, aimed to send "a strong, clear and united message on their commitment to consider dialogue as the only way forward and to reject violence".
They called for "an immediate halt to military operations to allow dialogue to continue".
The two-page declaration commits the signatories to respect the national unity and territorial integrity of Libya.
UN envoy Bernardino Leon, who attended the talks, told a news conference the meeting was "an important step" towards peace.
Signup to our newsletter and follow us on Facebook and Twitter!
Opposing militias in Libya, awash with weapons since its 2011 revolution that toppled longtime leader Moamer Kadhafi, are battling for control of its cities and oil wealth.
Libya has rival governments and parliaments, those recognised by the international community sitting in the far east of the country and the others with ties to Islamists in the capital Tripoli.
"There are two options: a political accord or destruction," Leon warned on Tuesday. "Destruction is not an option."
At the weekend in Morocco, he brokered the first direct talks between Libya's rival parliaments, and their envoys are due to hold another round in Rabat on Thursday.
But the internationally recognised parliament has asked for a delay of "one week to 10 days", its speaker Faraj Bouhachem said Wednesday.