Agent groups with density functions