add constructor for service agent