Connell and colleagues report the development of a multiphoton lithography-based three dimensional (3D) printing technique that enables the encapsulation of viable bacteria within microscopic gelatin-based sealed microcontainers. The bacteria are physically segregated from bacteria in other microcontainers but can still chemically communicate with them. This technique allows defined polymicrobial communities to be constructed in a limitless variety of 3D geometrical arrangements and will enable the sociomicrobiological interactions within these communities to be studied at an unprecedented level of detail.