Make Agent::getType virtual for greater flexibility