On Saturday NATO countries agreed at a summit in Warsaw to maintain troop numbers in Afghanistan and reiterated a funding pledge of USD 5 billion a year for local security forces until 2020.
"Afghanistan returned successfully from the Warsaw summit and I congratulate the nation for that," Ghani told reporters in Kabul.
"We achieved what we wanted to achieve and we are thankful to the world for that," he said.
About 12,000 NATO troops, of which the bulk are American, are currently stationed in Afghanistan under Operation Resolute Support, to train and assist Afghan security forces.
More From This Section
Attacks by the Taliban and other organisations like Al-Qaeda and the Islamic State group have meant NATO -- especially the US -- has been unable to leave Afghanistan after ending its combat operation at the end of 2014.
US President Barack Obama recently announced that he was slowing a planned draw down of US troops from Afghanistan from the current 9,800 to 8,400 by the end of the year.
Efforts to engage with the Taliban are in disarray. The US in May killed the group's leader, Mullah Akhtar Mansour, in a drone strike in Pakistan.
"Our call for peace is still in place, but only for those who call themselves Afghans, not for those who are used as tools by others," Ghani said.