Video screenshot by Michael Franco/CNET

As any tourist who's ever gotten a case of "traveler's tummy" knows, venturing to foreign countries can sometimes be a little tough on the digestive system. But tourists aren't the only ones who visit foreign lands -- members of the military do as well. That's why the Defense Advanced Research Projects Agency (DARPA) has given the Wyss Institute $4.7 million to develop a squadron of genetically engineered bacteria that will be able to identify, report on and attack harmful bugs in our gastrointestinal tracts.

Researchers at the institute, an alliance between various Harvard schools, plus other universities and medical centers, will be using the funds to create synthetic bacteria that will be able to detect inflammation in the gastrointestinal tract. The bacteria will be taken in pill form.

Once the engineered bacteria detects inflammation, it will be designed to change color and pass out of the body. At that point, doctors could easily identify issues based on the color of a patient's stool. In addition, the bacteria will be designed to attack harmful invaders in the system by emitting a specific toxin to kill bad bugs while not harming the rest of the colon.

Because the researchers are worried about the effects genetically engineered bacteria could have on the environment once they pass out of the human digestive tract, they will be designed to only be activated by the chemistry that's only found in our gut.

To test their synthetic bacteria -- some of which could be created using E. coli -- the researchers will use gut-on-a-chip technology. This technology effectively creates a mini organ outside the body by sustaining living cells from a particular organ -- in this case the gut -- on a silicone chip. In addition to having developed the gut-on-a-chip technology being used for this project, the Wyss Institute has also developed lung and liver chips. The technology lets researchers see how drugs and other technologies will react in the human body without actually needing a human body.

In addition to finding specific defenses against gastrointestinal infection and inflammation, the researchers are also hoping to gain a greater understanding of the human gut microbiome (the term microbiome refers to the collection of microorganisms living in our bodies).

"This multi-institutional effort to reprogram the human gut microbiome not only has implications for treating gastrointestinal illnesses, but also opens doors to new ways of treating countless other diseases that are impacted by the microbiome," Wyss founding director Donald Ingber said in a statement out Tuesday. Ingber will be involved with the research, which will be carried out over a two-year period.