South Sudan's President, Salva Kiir, has agreed to Ethiopian-mediated and direct talks with rebel leader Riek Machar, which are aimed at implementing a ceasefire and setting up a transitional government, US Secretary of State John Kerry says.

Speaking to reporters in Juba, Kerry said President Kiir was "willing to travel to Addis Ababa in the near term, sometime early next week hopefully, in order to engage in a discussion with the (Ethiopian) prime minister and hopefully with Riek Machar".

Kerry said Machar had already agreed to such a meeting, but he would hold further telephone talks with him later on Friday to set up the face-to-face talks, which would be the first to be held since South Sudan's civil war broke out four months ago.

"It is safe to say that President Kiir was very open ... to take forceful steps in order to end the violence and implement the cessation-of-hostilities agreement and to begin to engage with respect to a transitional government," Kerry told reporters.

"This meeting between Riek Machar and President Kiir is critical to be able to really engage in a serious way on how the cessation of hostilities agreement will now once and for all really be implemented," he added.

Kerry flew to Juba earlier on Friday on an unannounced visit to push for peace, amid mounting international outrage over atrocities and war crimes, and with the UN and aid agencies warning the country is on the brink of famine.

Thousands of people have already been killed and at least 1.2 million forced to flee their homes since rival troops loyal to President Kiir and sacked vice-president Machar started fighting on December 15.