RNA devices that directly bind small molecules to elicit an output are important both in natural and synthetic biology. In bacteria, RNA devices called "riboswitches" are a class of non-coding RNA elements commonly found in the 5’-UTRs of mRNAs that regulate expression in a cis-fashion by virtue of their ability to directly interact with a specific cellular metabolite. Recognition of the effector ligand by the mRNA is achieved by a receptor, known as the aptamer domain, whose complex tertiary architecture scaffolds a binding pocket that forms remarkably specific, high affinity complexes with the metabolite. Effector binding is communicated to a downstream regulatory domain, commonly called the expression platform, which forms of one of two mutually exclusive secondary structures that serve as signals for turning expression on or off. I will discuss our efforts to understand the structure and mechanism of natural riboswitches. Using the lessons of these studies we are now working to develop a new generation of RNA devices that can sense a desired small molecule to create a desired fluorogenic or regulatory output.