Position represents a relevant attribute needed by many applications, whose contexts are characterized by pervasiveness of the objects/things in the considered scenarios. In order to infer positions of pervasive objects, which are neither equipped with any location-sensing technologies, nor are unable to locate themselves, it is needed to support them with an appropriate infrastructure, which allows to determine their position in a manner that is transparent to applications. In this work, we aim at extending the positioning service using an agent-based approach, in order to discover and localize different kinds of objects, exploiting cheap and embedded technologies. We describe the design and the implementation of a layered architecture, that supports the localization of devices, and simple pervasive and ubiquitous objects. A simulation tool has been develop to evaluate the proposed solution in different application scenarios of every-day life.