The past few decades have seen the rapid development of artificial intelligence (AI) technology in diverse industries. Inspired by the fact that an agent is the central part of AI, we combine AI with the technology of the mobile agent. A mobile agent used in wireless sensor networks (WSNs) is popular for its mobility, executability, and autonomy. To improve the intelligence of the mobile agent, we proposed a conceptual theoretical framework named iAgent, where i means intelligent, and the agent refers to the mobile agent. Four designs of iAgent are detailed. Compared with the old mobile agent, the iAgent has a learning ability, which means that it can dynamically plan the path according to the external environment in order to reduce energy consumption. Based on iAgent, we also proposed a method to determine the number of iAgents and their visiting areas in a multi-iAgent WSN environment. The extensive simulation indicates that the multi-iAgent algorithm can significantly improve the performance of the WSNs, especially in saving energy and balancing network load.