We treat both external documentation and internal documentation as a deliverable in a sprint. Working on documentation iteratively has the same benefits as working on code the same way.
What Agile is against is large up front specifications, not documentation per se.