Chemomechanical polymers that change their shape or volume on stimulation by multiple external chemical signals, particularly on the basis of selective molecular recognition, are discussed. Several examples illustrate how such materials, usually in the form of hydrogels, can be used for the design of chemically triggered valves or artificial muscles and applied, for example, in self-healing materials or drug delivery. The most attractive feature of such materials is that they can combine sensor and actuator within single units, from nano- to macrosize. Simultaneous action of a cofactor allows selective response in the sense of AND logic gates by, for example, amino acids and peptides, which without the presence of a second effector do not induce any changes.