The envelopes surrounding AGB stars are similar to interstellar dark clouds in many respects; opaque to the visible light, they are transparent to mm wavelengths. Several envelopes, close enough to be spatially resolved with mm-wave interferometers, exhibit a remarkably rich molecular content, which can then be studied in detail as a function of radius. Because the envelopes are in expansion, their outer layers are older and more evolved than the inner ones, making it possible, thanks to a relatively simple geometry, to probe the time-dependence of the ongoing chemical processes.