The agreement, which came after seven rounds of talks, is a significant step towards ending decades of conflict.
Negotiators from the armed rebel groups still have to consult with their leaders before giving final approval.
Rebels from the newest and most active conflict in Kokang did not attend the talks.
The United Nations said the move was a "historic and significant achievement" and provided a basis for "genuine and lasting peace in the country".
Myanmar has been engaged in armed conflict with various ethnic rebel groups seeking greater autonomy since independence from the British in 1948.
While many have come into the political fold for peace deals, sporadic outbreaks of violence have continued.
All but two of the ethnic armed groups at the talks already have bilateral ceasefires in place.
"The people need peace, they desire peace and they expect peace," Thein Sein was reported by AFP as saying to negotiators on Tuesday.
He added that a full agreement could be signed in months. "After that is signed, the road is open for political dialogue. This action will ensure the peace-builders a place in Myanmar's history," he said.
The BBC's Jonah Fisher says one representative from the armed groups told him on Monday that the government had compromised significantly at the last moment to make a deal possible.
Our correspondent says the idea is to bring all the rebels into a process that will lead on to talks on greater devolution of power and resources - something that the Burmese government has always fiercely resisted.
At talks in Yangon the final four points of contention were resolved. There will be a halt to recruitment by the armed groups, their territory and status were confirmed, as was the nature and composition of the political dialogue that will follow.
The negotiators are now taking the text back to their groups for approval. There will then be a meeting which may lead to a signing.
Meanwhile there is still heavy fighting in the Kokang region and there are still regular clashes in other areas.
The government declared a state of emergency in February as tens of thousands of refugees have been forced to flee their homes, some of them crossing the border into China.
Naing Han Tha, who led the ethnic group negotiators for the ceasefire agreement, told AFP news agency that they planned to discuss the Kokang conflict in future dialogues.

Goulburn Ghost Tours manager Louise Edwards confirmed on Tuesday night the company would no longer run the Belanglo Forest ghost tours.
"From here on in, we will not be running Belanglo tours," she told Channel Ten's The Project.
The NSW government and victim support groups had condemned the tours.
Goulburn Ghost Tours has been taking groups to Belanglo, 120km (75 miles) south-west of Sydney.
The company initially defended the tours, saying they were run with "respect" and were not intended to upset anyone.
Milat is serving consecutive life sentences for murdering seven backpackers - two Britons, three Germans and two Australians - in the 1990s.
He had buried their bodies in Belanglo, which was also the site where a teenager related to Milat murdered a friend in 2010.
The family of the victim still live in the local area. Local media reported their disgust that the tours were being run.
Goulburn Ghost Tours' website and Facebook page remained offline on Wednesday and a phone number for the company appeared to be disconnected.
A cached version of the site advertising the Extreme Terror Tour said people would visit Milat's "old stomping ground", calling it "this most terrifying of locations".
It said it would use "paranormal techniques" to solve a murder.
"Are you ready to turn grey overnight? Do you love to be frightened? Would you like to solve a crime? Then the GGT Extreme Terror Tour is for you!" it said.
Ms Edwards told The Project that in hindsight, more thought should have gone into the marketing of the tours.
She said the company had received a lot of hate mail but also many "poignant and thoughtful" emails about why the tours should be cancelled, which "made us see this in a different light".
Myanmar's President Thein Sein has witnessed the signing of a draft ceasefire agreement between the government and 16 rebel groups.
[NEXT_CONCEPT]
A company criticised for conducting tours of a New South Wales (NSW) forest where serial killer Ivan Milat buried his victims has cancelled the tours.