Agent getState method added