Text this: Local requirements for optimal allocation of heterogeneous agents