Driven by the prevalence of the computation-intensive and delay-intensive mobile applications, Mobile Edge Computing (MEC) is emerging as a promising solution. Traditional task offloading methods usually rely on centralized decision making, which inevitably involves a high computational complexity and a large state space. However, the MEC is a typical distributed system, where the edge servers are geographically separated, and independently perform the computing tasks. This fact inspires us to conceive a distributed cooperative task offloading system, where each edge server makes its own decision on how to allocate local computing resources and how to migrate tasks among the edge servers. To characterize diverse task requirements, we divide the arrival tasks into different priorities according to the tolerance time, which enables to dynamically schedule the local computing resources for reducing the task timeout. In order to coordinate the independent decision makings of geographically separate edge servers, we propose a priority driven cooperative task offloading algorithm based on multi-agent deep reinforcement learning, where the decision making of each edge server not only depends on its own state but also on the shared global information. We further develop a Variational Recurrent Neural Network (VRNN) based global state sharing model which significantly reduces the communication overhead among edge servers. The performance evaluation conducted on a movement trajectories dataset of mobile devices verifies that the proposed algorithm can reduce the task consumption time and improve the edge computing resources utilization.