Current pervasive computing systems always focus on the local area network (LAN) environment, for example, an intelligent room or intelligent building. This paper uses mobile agent to implement the service migration mechanism, and make the pervasive computing system adaptable to work in wide area networks (WAN). The works in this paper includes three parts: (1) introducing mobile agent into wide area pervasive computing system and presenting the mobile agent based pervasive computing system for WAN (PCS-W). The PCS-W uses mobile agents as the underlying facility to migrate the service to the userpsilas environment in WAN; (2) presenting a novel service directory coherence mechanism for PCS-W: divided-domain and convergent directory coherence mechanism (DDCM); (3) presenting a high performance service migrating mechanism based mobile agent for PCS-W, which can effectively reduce the heavy communication overhead in WAN. The application of mobile agent enable PCS-W to be more suitable to work in WAN than conventional pervasive computing system.