How to set Agent Working Mode