Assange himself told us his agenda: he hated Clinton and wanted to prevent her election [1]. He then collaborated with Roger Stone[2] to desciminate the documents stolen by Russian intelligence [3], and succeeded at his goal.
1: https://www.itv.com/news/update/2016-06-12/assange-on-peston...
2: https://www.thedailybeast.com/roger-stone-and-wikileaks-dire...
3: https://www.politifact.com/truth-o-meter/article/2019/mar/18...