Shape-memory polymers (SMPs) possess the capability to change shapes upon stimulation; however, the programming process that determines the temporary shape cannot proceed without external manipulation, which may greatly affect the shape complexity, accuracy, and reproducibility. Here, an automatically programmable SMP (AP-SMP) based on asymmetric swelling of bilayer SMP structures is demonstrated without external manipulation. In the automatic programming process, the AP-SMP can be deformed by the swelling of its hydrophilic hinge film in warm water to a temporary shape, which could be fixed by the glass transition of the two SMP films through cooling and drying in air. Owing to the uniqueability, many complex shapes can be easilycustomized through diverse design strategies. Moreover, the AP-SMPs can reversibly transform between the permanent and temporary shapes, and both shapes are free-standing in normal conditions. The automatic programming of AP-SMPs may greatly expand the potential application range of SMPs.