Placing various molecules in confined spaces can profoundly alter their physicochemical properties. Examples in nature are abundant and range from stabilizing otherwise unstable species to orienting molecules in ways that can greatly accelerate chemical reactions between them. Over the past decade, chemists have investigated the behavior of different chemical species within synthetic confined environments. Notable examples include unusual regioselectivity and efficient catalysis of the Diels-Alder reaction within the cavities of octahedral palladium-based self-assembled cages, rendering white phosphorus stable to air, and promoting cationic reaction cascades leading to efficient terpene cyclizations. Inspired by the fascinating process of retinal photoisomerization within the cavity of rhodopsin, we are broadly interested in the behavior of photoswitchable molecules under confinement. Here, I will present our latest studies on the encapsulation of photoswitchable molecules within flexible self-assembled cages based on imidazole-palladium coordination. We found that the uptake of spiropyran by our cages is accompanied by its isomerization to its otherwise unstable, ring-open (merocyanine) form. The reaction proceeds quantitatively even for spiropyrans lacking the nitro group typically used to stabilize the open form. The encapsulation renders spiropyrans responsive to blue light, and the light-induced ring closing/spontaneous (dark) ring opening sequence can be repeated multiple times. This unexpected behavior of spiropyran within the cavities of these cages enabled us to fabricate gels, in which images could be created with light. Moreover, we found that a spontaneous conversion of the merocyanine form (blue) to the protonated merocyanine form (faint yellow) occurred spontaneously upon the dehydration of the system. This finding inspired us to prepare paper in which writing can be performed with water as the ink. We have also demonstrated an efficient uptake of various azobenzenes using the same flexible cages. Interestingly, azobenzene molecules were encapsulated as dimers, as confirmed by X-ray crystallography. This observation paves the way to studying the photoswitching behavior of discrete oligomers of photoswitchable molecules (here, dimers) within confined spaces.