AbstractA Wireless Sensor Network (WSN) is typically deployed in a location in which no electrical source is provided, meaning that sufficient battery life is crucial. Applications for WSNs require implementations of complex operations such as network administration. To simplify the development of these applications, several mobile agent middleware solutions have been proposed. Applications for these middleware frameworks are executed by communication among agents; therefore, a common operation is to look up agents. Because existing proposals do not have much technical support for an efficient approach to look up agents, every lookup consumes a significant amount of battery power and time. In addition, current approaches can fail in their lookup operations if the target agent moves during a lookup operation. This paper proposes Chord for Mobile agent on Sensor Network (CMSN), an efficient and effective lookup for mobile agent middleware. CMSN is inspired by Chord for Sensor Networks (CSN), which introduces hierarchical ring structures and a distributed hash table algorithm to improve lookup performance. Unfortunately, CSN cannot be applied to mobile agent middleware solutions because CSN always requires a base station and assumes no agent migration between nodes. Unlikely CSN, CMSN is designed for an environment where agents can freely move between nodes without dependency on a special node such as a base station. In addition, CMSN leverages a feature where the location of a node is stationary in order to improve lookup performance with simplified algorithms. We evaluate and compare CMSN in terms of performance, effective lookups, and battery consumption.