Both leaders, according to the Dawn, spoke for the first time over telephone on Monday.
A statement issued by the Prime Minister's Office quoted Prime Minister Abbasi, as saying, "We will work with Afghanistan for security and stability in the region," adding that terrorism was a common enemy and "we will work together to eliminate this menace from the region".
"It was agreed to work together to address the challenge of energy in the region and improve the economic condition in Pakistan and Afghanistan," the statement concluded.
The last known contact between the leaders of the two neighboring countries was made on the sidelines of the Shanghai Cooperation Organization meeting in Astana, Kazakhstan, about two months ago.
It was then agreed to use the Quadrilateral Coordination Group (QCG) mechanism as well as bilateral channels to undertake specific actions against terrorist groups and to evolve, through mutual consultation, a mechanism to monitor and verify such actions.
However, the two sides continue to blame each other for acts of terrorism in their respective countries.
On Monday, President Ghani phoned Prime Minister Abbasi and congratulated him on his election as the new chief executive of the country, said a PM Office statement.
It added that the Afghan leader expressed satisfaction over the smooth transition and said that it was good for democracy in Pakistan.
The brief statement did not mention any other thing from President Ghani.
Meanwhile, the Pakistan Foreign Office has rejected allegations made by the governor of Afghanistan's Kunar Province that the Khyber-IV military operation was meant to push militants into Afghanistan.
A spokesperson in a statement underlined that such statements were contrary to the spirit and understanding arrived at during recent engagements at the leadership level of the two countries.
"Such media headlines are misleading and part of the malicious campaign," it said.
"Khyber-IV is part of the ongoing counterterrorism operation Radd-ul-Fasaad. Our security forces have achieved success in fighting back terrorists," the statement said, adding: "The political leadership of the two countries had agreed that the two sides would coordinate and cooperate in their action to eradicate the menace of terrorism, which is a common challenge," it added.