Both agsXMPP and its paid version MatriX XMPP do not support this functionality.
The message archiving management is defined in the XEP-0136 XMPP extension.
According to some old threads here and here on the AG forum this extension is "huge and still on the todo list".
You can however add your own functionality to the SDK to manage this. It's quite straight forward.
The short answer is that you can't.
Both
agsXMPPand its paid versionMatriX XMPPdo not support this functionality. The message archiving management is defined in theXEP-0136XMPP extension.According to some old threads here and here on the AG forum this extension is "huge and still on the todo list".
You can however add your own functionality to the SDK to manage this. It's quite straight forward.