Directed evolution is a powerful technique for engineering proteins. Scientists now show that it can also be used to engineer synthetic nanoparticles as optical biosensors, which are used widely in biology, drug development, and even medical diagnostics such as real-time monitoring of glucose.