They said the ministers involved in the deal were led by Finance Minister Evangelos Venizelos.
"He was told that he must leave calmy in order to save his party," one source told Reuters on condition of anonymity. "He agreed to step down. It was very civilized, with no acrimony."
The source said Papandreou admitted he had made a mistake in calling on Monday for a referendum on a bailout package agreed with the EU last week. German and French leaders summoned him to a meeting in Cannes on Wednesday where they demanded Greece keep to the deal or risk exclusion from the euro zone.
"Venizelos told him he must make a graceful exit both for his sake and for the party's sake and that the ministers would help him do it," the source said. "This is provided he survives the confidence vote, which is not at all certain."
A minister present at the meeting said Papandreou agreed to step down after he had forged a coalition with the conservative New Democracy party.
"That was the agreement," the minister said on condition of anonymity. "That is now proving difficult because (opposition leader Antonis) Samaras is setting all these conditions."
Sources at New Democracy said they envisaged a non-political government that will rule for one month to six weeks and Papandreou's resignation was a key condition.
"We don't want to even have our own people in this government. In fact it would be best if it was completely non-political," a senior ND official said.
Government officials said the socialists would negotiate for it to last for 6 months and probably end up with 3 months.
Both parties agree that this government would ratify the bailout agreement and then take the country to elections.
If ND managed to win them outright, it would try to renegotiate the agreement.
"We only want to discuss and change what is not working and only with our partner's agreement. Policies that take us backward must change. For example, we've seen that every time they raise taxes, tax revenues go down," the ND official said.
Officials at PM's office refused to comment on the discussions in the cabinet. He has not said he would resign and his office has repeatedly denied such an intention.