agent related calculations are carried out outside of the main thread in order not to interfere with pause/stop