Thousands of politicians and officials from across Afghanistan gathered amid tight security in Kabul Monday to discuss the war and US efforts to forge a peace deal with the Taliban.

More than 3,000 people have been invited to the rare "loya jirga", which is being billed as the largest in modern Afghan history, in a bid to set possible conditions under which they might accept a peace settlement.

The loya jirga -- literally "grand assembly" in Pashto -- is being held at the US and Taliban are discussing a possible foreign troop withdrawal from Afghanistan in exchange for a permanent ceasefire and various Taliban pledges. 

The talks have so far cut out the government of President Ashraf Ghani, whom the Taliban view as a US stooge.

"We want to specify the main lines for the negotiations with the Taliban," Ghani said at the start of the summit. "We want clear advice from all of you."

Ghani's government hopes the high-stakes meeting will set out Kabul's conditions for any deal, including the continuation of the constitution and the protection of women's rights, the media, and free speech.

Ghani had invited the Taliban but the insurgents, having waged an unrelenting guerrilla war since 2001, refused. 

Much of Kabul was locked down Monday, with a weeklong public holiday declared for the duration of the four-day event.

Streets across the capital were closed and hilly overlooks blocked. In the past, the Taliban have blasted rockets at a tent hosting a loya jirga.

In a statement, the Taliban have vowed that any decisions or resolutions made at a loya jirga are "never acceptable to the real and devout sons of this homeland".

The most recent jirga was held in 2013 when Afghan officials endorsed a security agreement that allowed US troops to stay in Afghanistan beyond their planned withdrawal in 2014.