US president Barack Obama says American forces assisted in a failed attempt to rescue a French secret agent captured by insurgents in Somalia.

"United States combat aircraft briefly entered Somali airspace to support the rescue operation, if needed. These aircraft did not employ weapons during the operation," Obama said in his letter to to Congress on Sunday.

Obama said the troops provided limited technical support to French forces leading the operation on Friday.

The president sent the letter to US legislators to fulfil his obligations under the War Powers Resolution, which requires him to inform policy-makers within 48 hours of committing armed forces to military action without congressional authorisation.

Obama said the operation was warranted to further US national security interests, and said US forces "took no direct part in the assault on the compound where it was believed the French citizen was being held hostage."

The French team was trying to free Denis Allex, held since 2009 by al-Qaeda linked al-Shabaab, but insurgents apparently killed their hostage during the raid, along with a commando.

French officials say the hostage is almost certainly dead. A French commando was also killed in the rescue attempt.

The French defence ministry said that 17 Somali fighters also died in the fight.