Mr Panetta paid tribute to the dead and pledged to continue their fight
Seven CIA agents were killed in a bomb attack in Afghanistan, the US agency's director, Leon Panetta, has confirmed.
The dead include a mother of three who was the head of the CIA's base in Khost Province, near Pakistan, the Associated Press (AP) news agency reports.
The Taliban said one of their members wearing an explosive vest and an army uniform had carried out the attack.
US President Barack Obama has sent a message of condolence to the agency's staff praising the dead agents.
The attack was the worst against US intelligence officials since the US embassy in Beirut was bombed in 1983.
It has raised questions about the coalition's ability to protect itself against infiltrators, analysts say.
Quoting a former senior CIA official, AP said the base chief would have led intelligence-gathering operations in Khost, a hotbed of Taliban activity because of its proximity to Pakistan's lawless border region.
The unnamed official added that the bomber was being courted as an informant and was not frisked as he entered the base.
A total of 90 CIA employees have been honoured for their deaths in the agency's service since its inception in 1947, according to the Washington Post newspaper.
'Close to the enemy'
Paying tribute to the dead, Mr Panetta said six other agents had been injured in Wednesday's attack at Forward Operating Base Chapman.
Adam Brookes, BBC Washington correspondent
The circumstances surrounding the attack which killed seven CIA operatives at FOB Chapman, are not yet clear. However, a credible report in Washington says hat the bomber was not searched as he made his way onto the base. According to the report, he was part of an intelligence gathering operation, and was invited onto the base for a meeting with a senior CIA officer.
The attack is a very serious blow to the CIA. A great deal of experience and intelligence tradecraft will have been lost. It is unlikely however, that the attack will have placed a major obstacle to CIA operations in Afghanistan. Those operations take place on a very large scale and involve hundreds, even thousands of people.
We can anticipate that CIA officers are involved in penetrating Taliban and other insurgent networks, locating insurgent leaders for targeting and providing operational intelligence to the military.
"Those who fell yesterday were far from home and close to the enemy, doing the hard work that must be done to protect our country from terrorism," he said.
"We owe them our deepest gratitude, and we pledge to them and their families that we will never cease fighting for the cause to which they dedicated their lives - a safer America."
Taliban spokesman Zabiullah Mujahid told the BBC the Khost bomber was wearing an army uniform when he managed to breach security at the base, detonating his explosives belt in the gym.
Mr Obama said those killed were "part of a long line of patriots who have made great sacrifices for their fellow citizens, and for our way of life".
He told CIA employees that they had "taken great risks to protect our country" and that their sacrifices had "sometimes been unknown to your fellow citizens, your friends, and even your families".
Earlier reports said eight CIA agents had been killed by the blast.
Neither the names of the CIA officials killed nor the details of their work were released because of the sensitivity of US operations, the agency said in a statement.
"Yesterday's tragedy reminds us that the men and women of the CIA put their lives at risk every day to protect this nation," said Mr Panetta.
"Throughout our history, the reality is that those who make a real difference often face real danger."
CIA DEATHS: 1965-2009
2009: Seven killed in suicide attack on their base in Afghanistan
2003: Two CIA contractors die in Shkin, Afghanistan; CIA officer killed during training exercise in Afghanistan
2001: Officer shot during prison uprising in Afghanistan
1993: Two CIA employees killed at the agency's Virginia headquarters
1989: Six CIA employees die when a plane carrying military equipment from DR Congo to Angola crashes
1985: CIA Beirut station chief killed after having been kidnapped and tortured
1983: Eight CIA employees killed in the US embassy bombing in Beirut
1965: Seven CIA employees die, most of them in Vietnam
Source: Washington Post
The flags at the CIA headquarters in Langley, Virginia, were to be flown at half-mast in honour of the dead, he added.
Reports say the Chapman base is used by provincial reconstruction teams - which include soldiers and civilians - and is protected by some 200 Afghan soldiers.
The base has been described as "not regular" - a phrase that implies it was a centre of CIA operations in Khost province, the BBC's Peter Greste in Kabul says.
The forward operating base is reportedly used for US drone attacks on suspected militants in neighbouring Pakistan.
In the latest such attack, two people were reportedly killed in a strike on a house in Pakistan's North Waziristan on Thursday, security officials said.
Khost province - which is one of the Taliban's strongholds - has been targeted by militants in the past year.
The number of foreign civilians deployed in Afghanistan has been rising as international efforts there focus increasingly on development and aid.
Elsewhere in Afghanistan:
- Taliban militants beheaded six men they suspected of being spies for the government in the southern province of Uruzgan, police said
- Four Canadian soldiers and a journalist died in a roadside bomb attack in Kandahar, in the most deadly attack on Canadians in the country for more than two years
- Two French journalists were kidnapped in Kapisa province, north-east of Kabul, along with their Afghan driver and interpreter, reports say