US envoy Zalmay Khalilzad has in recent months held meetings with Taliban officials in Qatar

The United States is hoping Afghanistan can strike a peace agreement including the Taliban before elections scheduled for July, US envoy Zalmay Khalilzad said on Friday.

"It will be better for Afghanistan if we could get a peace agreement before the election, which is scheduled in July," the negotiator said, adding that there remained "a lot of work" to do.

Khalilzad, who is leading talks with the Taliban, was at the US Institute of Peace in Washington to discuss an ongoing push for a political settlement to the 17-year-old Afghanistan conflict.

A former US ambassador to Afghanistan who is now special envoy in the talks, Khalilzad has in recent months held meetings with Taliban officials in Qatar, where the group's senior leaders have an office in the capital Doha.

He has expressed cautious optimism about the prospect of a deal, and even announced a draft framework, but stressed nothing had been finalized.

Critics are skeptical about the talks for a number of reasons, primarily because they have not yet included the Afghan government, which the Taliban considers US-backed puppets.

Additionally, the Taliban have promised not to provide shelter again to foreign extremists, but experts say they cannot be trusted and even now are helping to hide foreign militants.

The talks come as President Donald Trump pushes to end the Afghanistan conflict, where about 14,000 US troops are still deployed and which has seen countless thousands of civilian and military deaths, as well as an infusion of more than $1 trillion in US cash into the country.

In his annual State of the Union speech on Tuesday, Trump said the time has come "to at least try for peace."

Afghanistan has suffered nearly constant conflict since the Soviet invasion of 1979, which was followed by civil war, the Taliban regime, and the US invasion in late 2001.

Khalilzad was a major player in George W. Bush's administration when the United States first invaded Afghanistan after the September 11, 2001 attacks.