Taliban officials and Western diplomats said Thursday that an agreement was imminent. They said that the two sides were finalizing a deal in which the Taliban would renounce ties to international terrorist groups and pledge that Afghanistan would not be used as a launching ground for attacks on the United States, as Al Qaeda did in 2001. In return, the Americans would declare a timetable for withdrawing their forces.