* Afghanistan says attack was planned in Pakistan
* Pakistan denies involvement, says committed to peace
* Talks come amid strained ties between both countries
Afghanistan and Pakistan agreed on Wednesday to jointly investigate an assassination attempt last week on Afghanistan's spy chief that has heightened tension between the countries after Kabul said the raid was planned in Pakistan.
Leaders of both countries, accompanied by ministers and their army chiefs, met at a trilateral summit hosted by Turkey only days after the head of Afghanistan's intelligence agency was wounded by a suicide bomber in the Afghan capital.
"A joint working group comprising relevant agencies of Afghanistan and Pakistan will address the recent attack on the National Security Director of Afghanistan," all three countries said in a statement.
With explosives hidden inside his underwear and posing as a peace messenger, a suicide bomber wounded spy chief Asadullah Khalid last Thursday in a brazen attack that threatened to derail a nascent and already fragile reconciliation process.
After the attack, Afghan President Hamid Karzai stopped short of directly blaming his neighbour but said he knew "for a fact" the bomber came from Pakistan and that Kabul would seek "clarification" from Islamabad during the meetings in Turkey.
Pakistan had said it would assist in any investigation into the bombing, but had also urged Karzai to provide evidence before "levelling charges", and suggested Kabul look into any lapses in its own security plans that may have facilitated the attack.
While Karzai and his Pakistani counterpart Asif Ali Zardari put up a united front on Wednesday, both leaders were scant on details of their talks over the attack, one of several in recent years in which Kabul alleges Pakistani involvement.
Asked whether he had received the clarification he had wanted before the meeting, Karzai said: "We had very good conversations and we are not going to divulge details."
Zardari declined to comment specifically on Karzai's allegations but said: "It is in the interest of Pakistan that Afghanistan prospers".
Speaking to Reuters after the summit, Pakistani Foreign Minister Hina Rabbani Khar said Karzai had assured the Pakistani side he had not specifically accused Pakistan.
"President Karzai told us that he made no specific remark which was specific to Pakistan ... because it would be obviously quite undeserved if any such remark was made," Khar said.
Both countries needed to have systems in place to protect people from such attacks, Khar said, and that there should be "no question of making allegations on anyone".
Ties between Kabul and Islamabad have been strained by cross-border raids by militant groups and accusations that Pakistan's intelligence agency backs Afghan insurgent groups to advance its own interests in the country.
Pakistan denies the accusations.
Despite their differences, Pakistan recently has sent strong signals it would back the Afghan government's efforts to draw the Taliban into negotiations after more than a decade of war.
Pakistan released 13 mid-level Afghan Taliban officials last month, meeting demands by Kabul, which has repeatedly pushed for access to prominent insurgents.
Officials from both countries have said Pakistan would also consider freeing former Afghan Taliban second-in-command Mullah Abdul Ghani Baradar if lower-ranking figures who were released advance the peace process.
Afghan officials believe he may command enough respect to persuade the Taliban to engage in formal talks with Kabul.
Foreign Minister Khar said it was too early to start talking about any possible release of Baradar but that Pakistan would continue to release other Taliban prisoners.