bacteria have powers to engineer the environment, to communicate, and may even think

Valerie Brown in Miller-McCune:

Vibrio_fischeri A few scientists noticed in the late 1960s that the marine bacteria Vibrio fischeri appeared to coordinate among themselves the production of chemicals that produced bioluminescence, waiting until a certain number of them were in the neighborhood before firing up their light-making machinery. This behavior was eventually dubbed “quorum sensing.” It was one of the first in what has turned out to be a long list of ways in which bacteria talk to each other and to other organisms.

Some populations of V. fischeri put this skill to a remarkable use: They live in the light-sensing organs of the bobtail squid. This squid, a charming nocturnal denizen of shallow Hawaiian waters, relies on V. fischeri to calculate the light shining from above and emit exactly the same amount of light downward, masking the squid from being seen by predators swimming beneath them.

For their lighting services, V. fischeri get a protected environment rich in essential nutrients. Each dawn, the squid evict all their V. fischeri to prevent overpopulation. During the day, the bacteria recolonize the light-sensing organ and detect a fresh quorum, once again ready to camouflage the squid by night.

More here.