Added grouping of resources per agent