Russian President Vladimir Putin said it would be 15km to 25km (9-15 miles) wide and come into force by 15 October.
Troops from Russia, an ally of Syria’s government, and Turkey, which backs the rebels, will patrol the zone.
The UN had warned of a humanitarian catastrophe if the Syrian army launched an all-out assault to retake Idlib.
But after Monday’s meeting between Mr Putin and Turkish President Recep Tayyip Erdogan in Sochi, Russian Defence Minister Sergei Shoigu said the deal meant there would be no such operation in the region.
What is the deal and what did Putin and Erdogan say?
The Russian president said that under the deal, all heavy weaponry, including tanks, rocket launch systems and mortar launchers operated by rebel groups would need to be pulled out of the buffer zone by 10 October.
“Radically-minded rebels”, including members of Hayat Tahrir al-Sham – a jihadist alliance linked to al-Qaeda that was once known as al-Nusra Front – would have to leave the zone, Mr Putin said.
It was not immediately clear if the zone included Idlib city, which would require some rebels to withdraw from it.
Mr Erdogan said: “We will prevent a humanitarian tragedy which could happen as a result of military action.”
He had earlier called for a ceasefire in northern Syria to prevent what he said would be a “bloodbath” and another major refugee crisis on Turkey’s southern border.Image copyrightAFPImage caption
Analysis by BBC Diplomatic Correspondent Jonathan Marcus
Any diplomatic arrangement that postpones a full-scale onslaught against Idlib will be welcomed by the international community.
Such an attack by the Assad government – backed by its Russian and Iranian allies – risked not just a humanitarian catastrophe, but also a direct military confrontation with Turkey.
Turkey has deployed troops at a number of locations in Idlib and has been reinforcing these over recent days. President Assad wants to reassert control over Idlib – the last province in rebel hands.
Both he and the Russians want to destroy rebel groups they call “terrorists”. It is hard to see exactly how a buffer zone arrangement involving Russia and Turkey can address these long-term problems. But averting an offensive for now may give breathing space for additional diplomatic moves.
What is Idlib and why does it matter?
Idlib province is the last major stronghold of rebel and jihadist groups which have been trying to overthrow President Bashar al-Assad for the past seven years, in a civil war that has killed more than 350,000 people.
Idlib, and adjoining areas of Hama and Aleppo, are home to an estimated 2.9 million people, including one million children.
A sharp increase in hostilities since the start of September and fears of further escalation have led to the displacement of tens of thousands. Hundreds of thousands in Idlib live in dire, overcrowded conditions, with a lack of basic services.
Idlib is not controlled by a single group, but rather by a number of rival factions commanding up to an estimated 70,000 fighters. The dominant force is Hayat Tahrir al-Sham (HTS), a jihadist alliance linked to al-Qaeda.
Idlib is also strategically vital. It borders Turkey to the north and straddles major highways running south from Aleppo to Hama and the capital, Damascus, and west to the Mediterranean coastal city of Latakia.
If Idlib is taken by the government, it would leave the rebels with a few pockets of territory scattered across the country and effectively signal their final defeat.
The chief importance of Idlib Province, is that it is the last area of conflict between Turkey, on the one hand, and the Iranians and Syrians on the other, that also contains Jihadist forces. As long as the Jihadists are in control there, the Iranians and allies have a quasi-legitimate reason for attacking. When a semi-permanent ceasefire is struck between the Turkish-policed areas and Russian-policed areas in Idlib, the terrorist excuse is nullified — and with it, the last legitimate reason for Turkey and Iran to quarrel in the Levant. Once the ceasefire becomes a fait accompli, Turkey and Iran can and will unite to attack their common object of hatred, namely, Israel.