The dollar retreated in August after posting its best month this year as investors prepare for a weaker economy and interest-rate cuts.