For the quantized consensus problem of nonlinear multi-agent systems affected by switching communication topologies, a learning model predictive control (LMPC) algorithm is proposed. The algorithm approximates and optimizes the LMPC cost function in real time through neural networks, and predicts the optimal control gain matrix online to effectively reduce the impact of communication defects on the system performance. Meanwhile, a hysteresis quantizer is combined to quantize the control inputs, alleviating the limitations of network resource constraints on the performance of multi-agent collaboration. To delineate the information exchange among multi-agents, the Markov switching topology with unknown partial transition probability is introduced. The exponentially consistent convergence of the systematic error is given using the Lyapunov stability theory. Finally, the effectiveness and applicability of the proposed method are verified by the nonlinear pendulum system.