The ceasefire "has been finalised", Pakistan's Defence Minister Khawaja Muhammad Asif posted on X on Sunday, saying both sides would meet again on October 25 in Istanbul to discuss "detailed matters".
Taliban spokesperson Zabihullah Mujahid said in a statement the parties agreed on a complete and meaningful ceasefire.
Qatar's foreign ministry, which mediated Saturday's talks along with Turkey, said the follow-up meetings were meant "to ensure the sustainability of the ceasefire and verify its implementation in a reliable and sustainable manner".
Pakistan and Afghanistan are seeking a way forward after the clashes killed dozens and wounded hundreds.
The talks were led by Asif and his Afghan counterpart, Mullah Muhammad Yaqoob, both sides said.
The ground fighting between the one-time allies and Pakistani air strikes across their contested 2600km frontier were triggered after Islamabad demanded Kabul rein in militants who had stepped up attacks in Pakistan, saying they operated from havens in Afghanistan.
The Taliban denies giving haven to militants to attack Pakistan and accuses the Pakistani military of spreading misinformation about Afghanistan and sheltering Islamic State-linked militants to undermine its stability and sovereignty.
Islamabad denies the accusations.
Militants have been waging a war for years against the Pakistani state in a bid to overthrow the government and replace it with their strict brand of Islamic governance.
On Friday, a suicide attack near the border killed seven Pakistani soldiers and wounded 13, security officials said.
"The Afghan regime must rein in the proxies who have sanctuaries in Afghanistan and are using Afghan soil to perpetrate heinous attacks inside Pakistan," the Pakistan Army chief, Field Marshal Asim Munir, said on Saturday, addressing a graduation ceremony of cadets.
The Taliban spokesperson said it was decided in Doha that "neither country will take hostile actions against the other, and support will not be provided to groups operating against the government of Pakistan".
Afghan government spokesperson Zabihullah Mujahid said Pakistan had conducted air strikes in Afghanistan hours after the ceasefire, which began on Wednesday, was extended on Friday for as long as the Doha talks continued.
He said the attacks targeted civilians, adding that Kabul reserved the right to respond but that Afghan fighters had been directed to refrain from retaliating to respect the negotiating team.
Afghanistan withdrew from the cricket Twenty20 international tri-series in Pakistan in November after the death of three local cricketers, which the Afghanistan Cricket Board said were due to military strikes in Paktika province.
Pakistan's Information Minister Attaullah Tarar said in a post on X on Saturday that Pakistan had struck "verified" camps of Islamist militants along the border areas and rejected that the strikes had targeted civilians.
He said militants had attempted to launch multiple attacks inside Pakistan during the ceasefire period.
He said more than 100 militants were killed by Pakistani security forces, the majority of them in strikes against a militant group that he said had carried out Friday's suicide attack on the military camp.
Reuters could not independently verify the militant death toll given or any targets.