This article studies consensus problem of multi-agent systems under fast switching networks depending on a small parameter 𝜀 > 0. In contrast to the existing methods that are qualitative, we present, for the first time, constructive and quantitative results for finding an upper bound on 𝜀 that preserves the consensus and for designing the consensus protocol that includes the designs of continuous-time controller and of sampled-data controller. We first employ a time-delay approach to periodic averaging for continuous-time control of multi-agent systems under fast switching networks leading to a time-delay model where the delay length is equal to 𝜀. We construct an appropriate Lyapunov functional for finding sufficient stability conditions in the form of linear matrix inequalities (LMIs). The upper bound on 𝜀 that preserves the exponential stability is found from LMIs. Moreover, sufficient conditions on the existence of controller gain are, for the first time, derived for the multi-agent systems under fast switching networks. For the implementation of consensus protocol, we further extend our method to sampled-data consensus of multi-agent systems under fast switching networks where additional Lyapunov functionals are presented to compensate the term due to the sampling. Finally, an example of Caltech multivehicle wireless test bed vehicles is given to illustrate the efficiency of the method.