If cells could talk, they’d have quite a story to tell: Their life history would include what molecules they’d seen passing by, which signals they’d sent to neighbors, and how they’d grown and changed. Researchers haven’t quite given cells a voice, but they have now furnished them with a memory of sorts—one that’s designed to record bits of their life history over the span of several weeks. The new method uses strands of DNA to store the data in a way that scientists can then read. Eventually, it could turn cells into environmental sensors, enabling them to report on their exposure to particular chemicals, among other applications.

“They’ve done a really exceptional job turning DNA into readable, writable memory inside living cells,” says Ahmad Khalil, a biomedical engineer at Boston University who was not involved in the new work. “I think it’s a very cool new direction for synthetic biology to take.”

In the past, researchers have turned cells into simple sensors by switching on or off the production of proteins in response to a stimulus. But each switch could record only one simple piece of information—whether the cell had been exposed to the stimulus—not the duration or magnitude of this exposure. And if the cell died, the information—encoded in a protein—would be lost.

“We wanted a system that would be easier to scale up to collect more than one piece of information,” says synthetic biologist Timothy Lu of the Massachusetts Institute of Technology in Cambridge. “So we started out, as engineers, thinking about what an ideal memory system would look like.”

Lu’s team settled on a biological program that rewrites a living cell’s DNA when the cell senses a signal—from a flash of light to the presence of a chemical. Once the DNA is altered, the information remains embedded in the genetic material even if the cell dies. By sequencing the genes of a population of cells that all contain the program, researchers can determine the magnitude and duration of the signal: The more cells have the genetic mutation, the stronger or longer the signal was.

The approach, dubbed Synthetic Cellular Recorders Integrating Biological Events (SCRIBE), relies on retrons—which make up a genetic system found naturally in some bacteria that produces single-stranded DNA that the bacteria normally use to alter their host. Lu’s team started with bacterial cells and inserted a retron that would be turned on—producing the unique DNA—only in response to a specific stimulus like a chemical. While the cell is in the process of copying its genetic material, the new DNA would then replace a nearly identical existing gene segment in the cell, changing it slightly.

Lu tested SCRIBE on cells that he engineered to sense light, as well as others that responded to a common biological reagent. In one instance, he made the memory especially easy to read by engineering the cells to mutate an antibiotic resistance gene in response to light. When cells were then grown in the presence of the antibiotic, the researchers could immediately see which cells contained the new gene. The results were confirmed by sequencing the bacteria’s genomes. But SCRIBE, described online today in Science, could be designed to sense other stimuli and cause any desired genetic mutation in return.

“There are a bunch of potential applications of this system,” Lu says. “One is being able to do long-term recording of a cell’s environment.” For example, he says, living cells could be left in an area of water for a week, then collected. Sequencing the DNA from the cells could then reveal whether the cells had been exposed to certain bacteria or toxins in the water. SCRIBE could also be a boon to basic researchers, Lu adds. “During development, as you go from a single cell to a multicellular organism, each cell encounters different cues,” he says. SCRIBE could let researchers record what each cell encountered to shape its fate.

“What’s neat about this strategy is that you have a lot more diversity and flexibility than other methods to give cells memory,” Khalil says. Because scientists can choose the stimulus—or multiple different stimuli—that they want the cell to record, as well as what gene change they want to use as a marker, the possibilities for applications are wide, he says.