A world model for ubiquitous computing environments is presented. It can be dynamically organized like a tree based on geographical containment, such as in a user-room-floor-building hierarchy and each node in the tree can be constructed as an executable software component. It provides 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.