The paper presents a design for a secured agent-based Network-on-Chip (NoC) utilizing a shortest path routing algorithm to enhance fault tolerance and performance in multiprocessor systems on chip (MpSoC). The proposed system implements hierarchical agents that monitor local faults and provide security by managing packet routing with a firewall mechanism, ultimately improving reliability and reducing packet latency. Experimental results demonstrate the effectiveness of the design compared to existing methods, showing significant reductions in average packet latency.