Add Agent class, add processing time measurement and logging.