The envelope of thermally pulsing asymptotic giant branch (TP-AGB) stars undergoing periodic third dredge-up (TDU) episodes is enriched in both light and heavy elements, the ashes of a complex internal nucleosynthesis involving p, alpha, and n captures over hundreds of stable and unstable isotopes. In this paper, new models of low-mass AGB stars (2 M-circle dot), with metallicity ranging between Z = 0.0138 (the solar one) and Z = 0.0001, are presented. Main features are (1) a full nuclear network ( from H to Bi) coupled to the stellar evolution code, (2) a mass loss-period-luminosity relation, based on available data for long-period variables, and ( 3) molecular and atomic opacities for C- and/or N-enhanced mixtures, appropriate for the chemical modifications of the envelope caused by the TDU. For each model, a detailed description of the physical and chemical evolutions is presented; moreover, we present a uniform set of yields, comprehensive of all chemical species ( from hydrogen to bismuth). The main nucleosynthesis site is the thin C-13 pocket, which forms in the core-envelope transition region after each TDU episode. The formation of this 13C pocket is the principal by-product of the introduction of a new algorithm, which shapes the velocity profile of convective elements at the inner border of the convective envelope: both the physical grounds and the calibration of the algorithm are discussed in detail. We find that the pockets shrink ( in mass) as the star climbs the AGB, so that the first pockets, the largest ones, leave the major imprint on the overall nucleosynthesis. Neutrons are released by the C-13(alpha, n)O-16 reaction during the interpulse phase in radiative conditions, when temperatures within the pockets attain T similar to 1.0 x 10(8) K, with typical densities of (10(6)-10(7)) neutrons cm(-3). Exceptions are found, as in the case of the first pocket of the metal-rich models (Z = 0.0138, Z = 0.006 and Z = 0.003), where the C-13 is only partially burned during the interpulse: the surviving part is ingested in the convective zone generated by the subsequent thermal pulse (TP) and then burned at T similar to 1.5 x 10(8) K, thus producing larger neutron densities (up to 10(11) neutrons cm(-3)). An additional neutron exposure, caused by the Ne-22(alpha, n)Mg-25 during the TPs, is marginally activated at large Z, but becomes an important nucleosynthesis source at low Z, when most of the Ne-22 is primary. The final surface compositions of the various models reflect the differences in the initial iron-seed content and in the physical structure of AGB stars belonging to different stellar populations. Thus, at large metallicities the nucleosynthesis of light s-elements (Sr, Y, Zr) is favored, whilst, decreasing the iron content, the overproduction of heavy s-elements (Ba, La, Ce, Nd, Sm) and lead becomes progressively more important. At low metallicities ( Z = 0.0001) the main product is lead. The agreement with the observed [hs/ls] index observed in intrinsic C stars at different [Fe/H] is generally good. For the solar metallicity model, we found an interesting overproduction of some radioactive isotopes, like Fe-60, as a consequence of the anomalous first C-13 pocket. Finally, light elements (C, F, Ne, and Na) are enhanced at any metallicity.