In February 2020 the Trump administration agreed to a deal with the Talibun that the US would withdraw its forces from Afghanistan. The agreement was only with the Talibun and did not include the Afghan government.The Trump administration followed the agreement by drawing down US forces according to Talibun stipulations.
The final US withdrawal was scheduled for May 2021. President Biden delayed the withdrawal, but he proceeded at the end of August. Both President Trump and President Biden eventually followed the agreement originally established by President Trump with the Talibun.