Task affinity is a scheduling constraint or heuristic in multi-agent system orchestration that biases the assignment of a specific computational task to a particular agent, processor, or hardware resource. This preference is driven by measurable performance gains, such as leveraging locally cached data, utilizing specialized hardware accelerators like GPUs or NPUs, or minimizing inter-process communication latency and overhead. It is a key consideration within distributed task allocation (DTA) and load balancing strategies, where pure workload distribution must be balanced against the cost of data movement and context switching.
