"The US remains fully committed to the mission to train, advice and to assist the Afghan security forces as they combat the insurgency to protect their people," Xinhua quoted Kerry as saying in a joint press briefing with Afghan President Mohammad Ashraf Ghani.
Kerry added that the US will firmly continue to help Afghans in the fight against Taliban militants and Islamic State (IS) terror outfit, saying "we are also deepening our counter-terrorism cooperation."
The top US diplomat arrived in Kabul earlier on Saturday for an unannounced visit.
The comments came as the violence has been on the rise in countryside as the spring and summer known as fighting season is drawing near. The Taliban insurgent group and IS militants have also increased their attacks since the drawdown of foreign forces over the past two years.
Nearly 13,000 foreign forces are currently stationed in Afghanistan within the framework of the NATO-led Resolute Support (RS) mission to help Afghan forces in the field of training and advising.
He made the comments as two international conferences on Afghanistan are scheduled to be held later this year -- Warsaw in July and Brussels in October -- will focus on security and development on the top of its agendas respectively.
Regarding the presence of US troops in Afghanistan after 2016, Kerry said that the decision will depend on the evaluation of US military commanders on the ground.
Replying to a question regarding the stalled peace process with the Taliban, Kerry said that there was still hope for the peace.(IANS)