The two countries are the main power brokers in Libya's conflict, where they support opposing sides. Russia backs the eastern-based forces of Khalifa Haftar, while Turkey has helped the Tripoli-based Government of National Accord (GNA) repel Haftar's attempt to storm the capital.
"We've just reached an agreement with Russia to work on a credible and sustainable ceasefire in Libya," President Tayyip Erdogan's top security adviser Ibrahim Kalin told Reuters.
Kalin said any deal must be based on a return to what he said were the Libyan frontlines in 2015, requiring Haftar's forces to pull back from the Mediterranean city of Sirte, gateway to Libya's eastern oilfields, and Jufra, an air base near the center of the country.
"For the ceasefire to be sustainable, Jufra and Sirte should be evacuated by Haftar's forces," Kalin told Reuters in an interview at the presidential palace in Ankara.
The United States has said Moscow has sent warplanes to Jufra via Syria to support Russian mercenaries who are fighting alongside Haftar's Libyan National Army (LNA). Moscow and the LNA both deny this.
Egypt, which also backs the LNA, has threatened to send troops into neighboring Libya if the GNA and Turkish forces try to seize Sirte. The Egyptian parliament on Sunday gave a green light for possible military intervention.
Kalin said any Egyptian deployment in Libya would hamper efforts to end the fighting and would be risky for Cairo: "I believe it will be a dangerous military adventure for Egypt."
Wednesday's joint agreement by Turkey and Russia on their ceasefire efforts included a call for measures to allow humanitarian access to those in need and efforts to promote political dialogue between the rival Libya sides.
But Kalin said Haftar had violated previous ceasefire agreements and was not a reliable partner, suggesting other figures in the east should play a role.
"We don’t take (Haftar) as a legitimate actor anyway," he said. "But there is another parliament in Tobruk. There are other players in Benghazi. The negotiations will have to take place between them."
The LNA has itself sent fighters and weapons to bolster its defense of Sirte, already badly battered from earlier phases of warfare and chaos since the 2011 revolution against longtime autocrat Muammar Gaddafi.Russia's Foreign Ministry says it backs a ceasefire and political talks that would culminate in united governing authorities. Russia has received senior delegations from both sides of the Libyan conflict in Moscow and tried and failed to get Haftar to sign up to ceasefire agreement.