Benefiting from the rapid progress of wireless communication and artificial intelligence, multi-agent collaboration opens up new opportunities for various fields. To facilitate multi-agent acting as a group, effective communication plays a crucial role. Recently, many efforts based on multi-agent reinforcement learning have been made to enable effective multi-agent communication under limited bandwidth or noisy channel. However, current methods do not explore wireless resource allocation strategy explicitly. Moreover, due to ignoring task-relevant significance of information, traditional wireless resource allocation schemes may fail to guarantee the transmission efficiency and reliability for multi-agent communication. To this end, in this paper, we propose a task-oriented communication principle for multi-agent communication. We model the task-oriented channel allocation problem as a decentralized partially observable Markov decision process and propose a multi-agent reinforcement learning framework as a solution. Specifically, we design a novel variational information bottleneck to extract task-relevant information from local observation. Furthermore, a task-oriented channel allocation mechanism is developed to choose the allocation pattern with maximum expected gain. Finally, a double attention mechanism is developed to motivate the efficient utilization of task-relevant information. Experimental results show that our method can improve the effectiveness and efficiency of multi-agent communication, enhancing collaboration performance compared to baselines.