Cucurbit[7]uril complexation drives thermal trans-cis-azobenzene isomerization and enables colorimetric amine detection.