  We examine the envelope properties of asymptotic giant branch (AGB) stars as
they evolve on the upper AGB and during the early post-AGB phase. Due to the
high mass loss rate, the envelope mass decreases by more than an order of
magnitude. This makes the density profile below the photosphere much shallower,
and the entropy profile much steeper. We discuss the possible role of these
changes in the profiles in the onset of the high mass loss rate (superwind) and
the large deviation from spherical mass loss at the termination of the AGB. We
concentrate on the idea that the shallower density profile and steeper entropy
profile allow the formation of cool magnetic spots, above which dust forms much
more easily.
