The answer to this question depends a little on how much granularity you want around session length information. As such, I highly recommend that you email support to get more clarification around your particular use case.
With that caveat listed, Kontagent calculates average session lengths for most customers so that you don't need to pass in or calculate "session" information on your side. This average session length is calculated by examining the stream of messages for a given user of an application and then looking for a gap in messages greater than some threshold (for social apps, the threshold is 30 minutes; for mobile apps, the threshold is 2 minutes) that indicate the termination of one session and, potentially, the start of the next session.
If you need to get more granular than examining the average session length (for example, if you wanted to look at the session lengths for a particular user) then this query can be run in our DataMine product, which allows you to query the raw message data that you pass Kontagent.