Hello Srujan,
in Client 0 there is the variable UC_HOSTCHAR_DEFAULT, there you can setup an action for these 4 agent states:
EXECUTE_ON_ASSIGNMENT
EXECUTE_ON_END
EXECUTE_ON_LOST
EXECUTE_ON_START
Documentation for these entries, see below:
Automic
Regards
Jan