In a multi-agent system (MAS), the agents are often considered to be autonomous entities, such as robots or software programs, each under the influence of a local rule, representing its interaction with other agents. Over the past few years, most research in the study of discrete-time MAS's concentrates on linear local rules. However, local interactions between agents are more likely to be governed by nonlinear rules with time-varying delays. This paper investigates the consensus of discrete-time MAS's with nonlinear local rules and time-varying delays. Based on a representative model, we obtain some basic criteria for the consensus of such MAS's. These results cover several existing results as special cases. Moreover, the above criteria are applied to the consensus of the classical Vicsek model with time-varying delays. Simulation results are presented to validate the obtained criteria.