Recently, accidents in homes of elderly people are increasing due to an increase in single elderly people and shortage of nursing care workers in Japan. 70% of elderly accidents occur in their houses, and it is urgently needed to develop a system to watch residents. In Biofied Building, we are conducting a research on watching over the resident by introducing a small sensor agent robot into the house. It acquires physical information near the resident and acts as a communication robot. The robot must move carefully reflecting the position of the resident. The motion flow of the previously proposed robot continues to follow people at all times. There were concerns such as the possibility of a collision accident with people and furniture and discomfort due to the behavior of the robot. In this research, we propose a motion flow in which people and robots move alternately by incorporating standby behaviors in the motion flow of robot. These are intended to reduce the collision accident and discomfort by applying the potential method using the walking history of the resident. By setting the walking history of the resident as the repulsive potential, we estimated the place away from the flow line of the person as the standby position of the robot. Regarding the movement route, by using the walking history of a person as an attraction field, we generated a path away from furniture and walls. We conducted simulation studies and implemented the propose method to the robot.