Ghani and Abdullah have been in disagreement over the results of June elections.
Ghani said that they would form a government of unity and that they understood the need to work together, reports the BBC.
However, the government's power structure is not yet clear.
The United States is looking forward to the presence of Afghanistan at the NATO summit in September.
Although the Taliban have increased their attacks in the country, most foreign troops are expected to be removed by the end of the year.