President Obama praised the nation’s spying operations Friday calling it the most capable in the world while promising a review aimed at preventing future mistakes, a day after revealing an intelligence failure that killed two Al Qaeda hostages.

 "We all bleed when we lose an American life," Obama said in a speech at the Office of the Director of National Intelligence to mark its 10th anniversary. "We all grieve when any innocent life is taken. We don't take this work lightly. And I know that each and every one of you understand the magnitude of what we do and the stakes involved and these aren't abstractions and we're not cavalier about what we do."

Obama said he knows the U.S. intelligence community has faced harsh criticism but can take with great pride that its work has made America work secure. “You do an outstanding job,” he said.

"The world doesn't always see your successes, the threats that you prevent or the terrorist attacks you thwart, or the lives that you save," Obama told intelligence officials gathered in an auditorium at the sprawling gray office building outside Washington. He said their intelligence helped take out Usama bin Laden and other Al Qaeda leaders, showed that Syria had chemical weapons, revealed Russian aggression in Ukraine and supported nuclear negotiations with Iran.

"It's been 10 long and challenging years, but when we look back on those 10 years, the American people have been a whole lot safer," Obama said.

Obama’s praise came one day after the White House announced that a counterterrorism operation in January against an Al Qaeda compound accidentally killed two aid workers being held hostage – American Warren Weinstein and Italian Giovanni Lo Porto. Obama said the U.S. was unaware the hostages were in the targeted position, despite hundreds of hours of surveillance of the compound.

The White House said the attack also killed two American Al Qaeda leaders, Ahmed Farouq and Adam Gadahn, without the U.S knowing in advance they were there. Targeting an American with a drone strike would have triggered a more scrutinized review in consideration of constitutional due process protections.

We're going to review what happened," Obama said Friday. "We're going to identify the lessons that can be learned and any improvements and changes that can be made. And I know those of you who are here share our determination to continue doing everything we can to prevent the loss of innocent lives.

"This self-reflection, this willingness to examine ourselves, to make corrections, to do better, that's part of what makes us Americans. It's part of what sets us apart from other nations," Obama said.

"The United States is the most professional, most capable, most cutting-edge intelligence community in the world," he said, adding that they are sharing more intelligence than ever with partners around the world while tapping new technologies and satellites.

Obama’s speech was planned long before the drone revelation to mark the office’s anniversary, the White House said. The office of the Director of National Intelligence was created by President George W. Bush after the 9/11 attacks to coordinate the vast amounts of intelligence produced by 17 different government organizations, including the CIA, Pentagon, Cabinet departments and other law enforcement agencies.

Obama said Director of National Intelligence James Clapper is one of the first people he sees every day, as Clapper delivers the intelligence report known as the President's Daily Brief. "He gives me his honest assessment, free of politics, free of spin. I trust his integrity and I can't tell you how invaluable that is in the job that he has," Obama said.

Obama said his only complaint is Clapper's habit of leaving paper clips all over the Oval Office as he shuffles through papers. The president then held up a see-through jar of paper clips and said he was returning them. "This will be available to you. The DNI's budget's always a little tight," Obama said.

The Associated Press contributed to this report