"We have both agreed that our two countries have plenty of collaborative elements to work on peacefully," Ethiopian PM Abiy said in a Twitter post, accompanied by a picture of the two men.
"Our common bonds surpass any divisions. We both made a commitment for dialogue & peaceful resolution to outstanding issues," he said.
Both leaders were in the Kenyan capital for a summit of the Intergovernmental Authority on Development (IGAD) regional body.
Their talks follow a clash in a volatile border region last month in which Khartoum said that Ethiopian forces had captured and killed Sudanese troops -- claims denied by Addis Ababa.
IGAD and the African Union had both voiced alarm last week over the escalating tensions between Ethiopia and Sudan following the incident in the disputed Al-Fashaqa border area.
Khartoum said the Ethiopian army had executed seven Sudanese soldiers and a civilian in a clash on June 22 in Al-Fashaqa, and announced it was recalling its ambassador.
But Addis Ababa claimed that Sudanese forces had crossed into Ethiopian territory and that the casualties resulted from a skirmish with a local militia, denying its soldiers were in the area at the time.
Al-Fashaqa is a fertile strip of land that has long been a source of friction between Addis Ababa and Khartoum.
The region, which lies close to Ethiopia's war-torn northern region of Tigray, has long been cultivated by Ethiopian farmers but is claimed by Sudan.
The dispute has sparked sporadic clashes between the two sides, some fatal.
Tensions were heightened further after fighting erupted in Tigray in November 2020, sending tens of thousands of refugees fleeing into Sudan.