The ^19^F production during the first dozen thermal pulses of AGB stars with masses M and metallicities Z (M=3Msun_, Z=0.02), (M=6Msun_, Z=0.02) and (M=3Msun_, Z=0.001) is investigated on grounds of detailed stellar models and of revised rates for ^15^N(α,γ)^19^F and ^18^O(α,γ) ^22^Ne. These calculations confirm an early expectation that ^19^F is produced in AGB thermal pulses. They also enlarge substantially these previous results by showing that the variations of the level of ^19^F production during the evolution is very sensitive to the maximum temperature reached at the base of the pulse. These variations are analyzed in detail, and are shown to result from a subtle balance between different nuclear effects (mainly ^19^F production or destruction in a pulse, and ^15^N synthesis during the interpulse), possibly superimposed on dilution effects in more or less extended pulse convective tongues. Our calculations, as most others, do not predict the third dredge-up self-consistently. When parametrized, it appears that our models of intermediate-mass AGB stars are able to account only for the lowest ^19^F overabundances observed in solar-metallicity MS, S and C stars. That conclusion is expected to hold true for low-mass stars when fluorine production results from secondary ^13^C only. Massive AGB stars, on the other hand, are not expected to build up large surface F abundances. Therefore, the large fluorine overabundance reported for the super Li-rich star WZ Cas (where hot bottom burning is supposed to be operating) remains unexplained so far. Our results for the (3Msun_, Z=0.001) star indicate that fluorine surface overabundances can also be expected in low-metallicity stars provided that third dredge-ups occur after the early cool pulses. The relative increase in the surface ^19^F/^12^C ratio is, however, lower in the low-metallicity than in the solar-metallicity star. No observations are reported yet for these stars, and are urgently called for.