A UI is part of the system architecture, and architecture fundamentals do need to be defined early in development
I am inclined to agree and disagree. I have been on one Agile project that had significant UI redesigns (a mostly mock application). This was done as part of R&D to understand what was an optimal UI as the client had difficulty knowing what they really wanted. From this, requirements were fully fleshed out with the client. Documentation tended to be written post fleshing out of documentations at the end of a development cycle (where it would go into two detatched iterative processes for manual testing and documentation writing).
Agile is definitely not "making stuff up as you go along".
But Agile methodology can certainly be used to figuring things out and rapidly delivering mock applications that can then be developed into more solid fleshed out requirements.