How to add a Trigger for automatically changing the Agent Status:

Status-ID could be 1 for 'Available', 6 for 'Not Available' or any other Status-ID from your status list.