Adaptive routing protocols for determining optimal paths in AI multi-agent systems: a priority- and learning-enhanced approach