Our experience with using the tuple space abstraction in context-aware applications, evidenced that the traditional Linda matching semantics based on value equality are not appropriate for this domain, where queries often require the ability to match on value ranges, deal with uncertainty, and perform data aggregation. Originally developed as the core tuple space layer for the LIME middleware, LIGHTS provides a flexible framework that makes it easy to extend the tuple space in many ways, including changing the back-end implementation, redefining the matching semantics, and providing new constructs. In this paper, we describe the design and programming interface of LIGHTS, and show how its flexible architecture can be easily extended to define novel constructs supporting the development of context-aware applications.