Late on Saturday, Haftar forces announced a ceasefire starting at 2200GMT.
The head of Libya's UN-recognised Government of National Accord (GNA) Fayez al Sarraj and his rival, warlord Khalifa Haftar, are expected to sign a ceasefire agreement in Moscow on Monday, a senior Libyan official said.
The signing of the agreement will pave the way for the revival of the political process, said Libya's head of High Council of State Khaled al Mechri on the country's al Ahrar TV channel.
Fayez al Sarraj on Monday called on Libyans to "turn the page on the past", as he prepared to sign the ceasefire agreement.
"I call on all Libyans to turn the page on the past, reject discord and to close ranks to move towards stability and peace," he said in a short televised speech.
Both sides in Libya's conflict agreed to a ceasefire that started early on Sunday following weeks of international diplomacy and calls for a truce by power-brokers Russia and Turkey.
The oil-rich North African country has been wracked by bloody turmoil since a NATO-backed uprising killed long-time dictator Moamer Kadhafi in 2011.
Since April last year, the Tripoli-based, UN-recognised Government of National Accord (GNA) has been under attack from forces loyal to eastern-based strongman Khalifa Haftar, which days ago advanced to take the strategic coastal city of Sirte.
Late on Saturday Haftar forces announced a ceasefire starting at the stroke of midnight (Sunday 00:00 local time, Saturday 2200 GMT) in line with a joint call by Turkish President Recep Tayyip Erdogan and his Russian counterpart Vladimir Putin.
Early on Sunday the head of the GNA, Fayez al Sarraj, also announced an agreement to the ceasefire, saying it had taken effect at the start of Sunday.
Sarraj stressed the GNA's "legitimate right ... to respond to any attack or aggression" that may come from the other side – just as Haftar forces had warned of a "severe" response to any violation by the "opposing camp".
Artillery fire could be heard shortly after midnight from the centre of the capital, before quiet settled over the southern Tripoli suburb where pro-GNA forces have been resisting Haftar's offensive launched April 4, 2019.
Fears of a 'second Syria'
Erdogan and Putin had called for a ceasefire at a meeting on Wednesday in Istanbul, and Turkey on Saturday asked Russia to convince Haftar, who had initially vowed to fight on, to respect it.
Ankara deployed military support to the GNA in January, while Russia has been accused of supporting pro-Haftar forces, which are also backed by the United Arab Emirates and Egypt.
Europe and North Africa have launched a diplomatic offensive to try to prevent Libya, with the increased involvement of international players in its conflict, from turning into a "second Syria".
European governments are concerned that militants and migrant smugglers, already highly active in Libya, will take further advantage of the chaos.
On Saturday Putin and German Chancellor Angela Merkel met in Moscow and called for international efforts to address the crisis in Libya.
Merkel, making her first visit to Russia since 2018, said she hoped "the Turkish-Russian efforts will be successful," calling a ceasefire a first step in a peace process.
Putin and Merkel both backed a Libya peace conference in Berlin being organised by UN special envoy to Libya, Ghassan Salame, which could be held in the coming weeks.
Both Russia and Turkey have emerged as key players in Libya.
While Turkey has sent defence equipment and troops to support the UN-backed Tripoli government, Moscow is accused of backing mercenaries supporting Haftar.
Putin on Saturday reiterated Moscow's denial of this, saying: "if there are Russians there, they do not represent the interests of the Russian state and do not receive money from it."