This paper presents a world model for location-aware and user-aware services in ubiquitous computing environments. It can be dynamically organized like a tree based on geographical containment, such as user-room-floor-building, and each node in the tree can be constructed as an executable software component. The model is unique to existing approaches because it can be managed by multiple computers in an ad-hoc manner and it can provide a unified view of the locations of not only physical entities and spaces, including users and objects, but also computing devices and services. A prototype implementation of this approach was constructed on a Java-based mobile agent system. This paper presents the rationale, design, implementation, and applications of the prototype system.