test gate and agent