Last month, I wrote a feature for New Scientist about smart probiotics—bacteria that have been genetically programmed to patrol our bodies, report on what they find, and improve our health. Here’s how the piece began:

“[There’s a] growing club of scientists who are tweaking our microbiome—the microbes that live in or on our bodies—in pursuit of better health. They are stuffing bacteria with circuitry composed of new combinations of genes, turning them into precision-targeted micro-drones designed to detect and fix specific problems.

Some lie in wait for pathogens like P. aeruginosa or the cholera bacterium Vibrio cholerae, releasing lethal payloads when they have the enemy in sight. Some use the same tactics to attack cancer cells. Others can sense signs of inflammation and release chemicals that could help to treat chronic conditions like inflammatory bowel disease. And these tricks aren’t just confined to the lab. In the next 18 months, at least one start-up is expected to put its newly created synthetic bugs into clinical trials with real people. Welcome to the age of smart probiotics, where specially designed bacterial rangers patrol the gut, reporting on the state of the environment, eliminating weedy species, and putting out fires.”

This work is part of the growing field of synthetic biology, which brings the principles of engineering to the messy world of living things. Synthetic biologists treat genes as “parts”, which they can pick from a registry, combine into “circuits” or “modules”, and stuff into a living “chassis”. Rather than modestly modifying one or two genes, they remix large networks, to produce yeast that can brew antimalarial drugs instead of beer, cells that self-destruct if they turn cancerous, or microbes that can sense and quench inflammation in the gut.

Initially, these microbiome engineers started by modifying the obvious laboratory darlings, like Escherichia coli, or species used in probiotic yoghurts, like Lactobacillus. These bacteria have been studied for a long time and are easy to manipulate. But they are actually relatively rare in our guts. They also lack staying power, which is why the current generation of probiotics don’t colonise the people who swallow them, and rarely deliver on their fabled health promises.

If you want to turn a microbe into a gut ranger, you’re better off starting with a species that’s well-adapted there. And there are few better choices than Bacteroides thetaiotamicron—B-theta to its friends. Collectively, the Bacteroides genus makes up between 30 and 50 per cent of the microbes in a Western person’s gut. They’re exquisitely attuned to that environment and they’re excellent colonisers. And B-theta is arguably the best-studied of them. It was an early star of the microbiome craze: by working on this microbe back in the 1990s, pioneers like Jeff Gordon began to understand how important gut bacteria are to our lives.

Now, Mark Mimee and Alex Tucker from MIT have hacked B-theta, creating a small library of biological parts that can be used to programme it.

They started by building circuits that can permanently activate a given gene, and then tune its activity to a specific level within a 10,000-fold range. They tested these circuits by hooking them up to a gene that makes a glowing enzyme, and showed that they could precisely set the brightness of the glow.

Next, they created inducible circuits, which would activate a target gene only when they receive some kind of external trigger, like a drug or a dietary nutrient. When the trigger arrives, the circuit produces an enzyme that cuts out a particular piece of DNA, flips it around, and glues it back into place. A microbe that carries this circuit has memory—by inverting its DNA, it permanently records its encounter with the triggering substance. Mimee and Tucker could then tell if the trigger was present by sequencing the right region and looking for the inversion. They had effectively turned B-theta into a journalist that could sense and report on the events in a gut.

Finally, the team created circuits that can inactivate specific genes in B-theta. They used a powerful new technique called CRISPR interference, in which an enzyme called Cas9 is guided to a specific stretch of DNA. Cas9 normally acts like a pair of scissors that cuts whatever DNA it encounters. But in CRISPR interference, the scissors have been blunted. Rather than cutting a target gene, Cas9 just sits there, stopping other enzymes from activating it.

Mimee and Tucker connected Cas9 to genes that sense external triggers, so they could unleash it when they wanted. Then, they used different guide molecules to target Cas9 to specific genes. Now, they could inactivate those genes whenever they wanted, by delivering the right trigger. “It’s a flexible strategy for turning off any gene you want,” says Timothy Lu, who led the study.

A cynic might say that these circuits already existed, and the team just repurposed them for use in B-theta. But that was not easy. Unlike E.coli, which grows with ridiculous ease, B-theta is exquisitely sensitive to oxygen. To work with it, the team had to exclude the omnipresent gas by buying an anaerobic chamber. They also had to develop new ways of introducing foreign DNA into the bacterium—something that’s easy to do in E.coli, but harder in several other species.

Synthetic biology projects have often advanced to this point and then face-planted. Circuits that look good on paper and work in a dish will then fail when they’re incorporated into an actual cell or, in the case of gut microbes, when those cells are loaded into an animal. Pamela Silver from Harvard Medical School achieved one of the first successes last year by programming E.coli with a memory switch, and testing it in mice Lu’s team have now done the same. When they gave their programmed microbes to mice, everything worked. The inducible memory switches turned on when the mice ate the right triggers, as did the Cas9 suppressors. “We were surprised at how well they did,” says Lu.

“This is a beautiful, elegant piece of work that shows the power of synthetic biology to make a previously challenging organism immediately accessible to the scientific community,” says Michael Fischbach from the University of California, San Francisco, who is also programming his own microbes. “Bacteroides is an ideal ‘chassis’: a friendly bacterium that colonizes the gut professionally.”

“This study provides a nice proof of concept that portable components can be combined and function in this gut commensal,” agrees Justin Sonnenburg from Stanford University, who has been working with B-theta for decades and is also engineering it. “This rapidly expanding direction for gut microbiota research will eventually give us new insight into microbiota-host interaction and medically useful microbes.”

By that, he means that programmed gut microbes could tell us a lot more about the gut than we currently know. The organ is still a bit of a black box.Food goes in and, some 8.5 metres later, waste comes out. Yes, we roughly understand what happens in the middle, but the details are still elusive. When Sonnenburg applied for his position at Stanford, an interviewer asked him: “What a single cell has experienced while transiting the digestive tract? If there’s a little inflammation, has it experienced that? Does it stick around eating plant polysaccharides? How could you tell?” Those are the kinds of questions that he, Lu, and others hope to address with their microbial reporters.

They also want to connect detection circuits to therapeutic ones, so that microbes can not only spot early signs of infections and chronic diseases, but also correct them. You could imagine handing out these sentinel microbes to people in the midst of epidemics, like the cholera outbreak that is still raging in Haiti. Alternatively, soldiers and tourists could take them before travelling abroad to regions with a high risk of diarrhoeal diseases. The possibilities are vast.