On February 29, 2020, the U.S. and the Taliban signed a peace agreement titled the Agreement... with provisions including the withdrawal of all regular American and NATO troops from Afghanistan
...
The deal was supported by China, Pakistan, and Russi...
...
The Trump administration agreed to an initial reduction from 13,000 to 8,600 troops by July 2020, followed by a full withdrawal by May 1, 2021 if the Taliban kept its commitments. The Biden administration, however, said the US would not begin withdrawing until May 1 and would complete the withdrawal before September 11. On July 8, Biden specified a U.S. withdrawal deadline of August 31
https://en.m.wikipedia.org/wiki/Withdrawal_of_United_States_troops_from_Afghanistan_(2020%E2%80%932021)