The invention relates to methods of detecting the presence or activity of a target molecule in a sample comprising a) contacting the sample with i) a polynucleotide encoding a biosensor polypeptide comprising a modified circularly-permuted thermostable luciferase and a linker linking the C-terminal portion of the thermostable luciferase to the N-terminal portion of the thermostable luciferase, the modified circularly-permuted thermostable luciferase modified relative to a parental circularly-permuted thermostable luciferase, the linker comprising a sensor region capable of interacting with a target molecule in a cell, and wherein the modified circularly-permuted thermostable luciferase has an enhanced response after interaction of the biosensor with the target molecule relative to at least one of: A) the parental circularly-permuted thermostable luciferase in the presence of the target molecule, or B) the modified circularly-permuted thermostable luciferase in the absence of the target molecule; and ii) a substrate for the modified thermostable luciferase; and b) detecting luminescence in the sample.