An optimal disturbance rejection controller design method is put forward analytically for the synchronised output regulation of time-delayed multi-agent systems (MAS). All kinds of linear MAS can be described by a novel block diagram based on transfer functions in a unified framework. For each subsystem without intercommunication, the optimal output, input and balancing output–input load disturbance rejection controllers are designed independently. A filter is used to be in series with each controller to not only stabilise the whole systems but also achieve a tradeoff between nominal performance and robustness by adjusting a single tuning parameter. The proposed distributed <alternatives>$H_2$<mml:math overflow="scroll"><mml:msub><mml:mi>H</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:math><inline-graphic xlink:href="IET-CTA.2016.1528.IM1.gif" /></alternatives> controllers calculated by algebraic solution perform better capacity of disturbance attenuation than the conventional given-structured protocols. Two simulation examples demonstrate the validity of the new algorithm.