A biosensor capable of continuously measuring specific molecules in vivo would provide a valuable window into patients’ health status and their response to therapeutics. Unfortunately, continuous, real-time molecular measurement is currently limited to a handful of analytes (i.e. glucose and oxygen) and these sensors cannot be generalized to measure other analytes. In this talk, we will present a biosensor technology that can be generalized to measure a wide range of biomolecules in living subjects. To achieve this, we develop novel reagents (molecular switches) that change its structure upon binding to its target analyte and emit light or produce an electrochemical signal. Our real-time biosensor requires no exogenous reagents and can be readily reconfigured to measure different target analytes by exchanging the molecular switches in a modular manner. Importantly, we will discuss methods for generating the molecular switches which are at the heart of this biosensor technology.