The Taliban has agreed to stop attacks after the US promised to halt its raids supporting Afghan forces in Helmand.