Low-mass asymptotic giant branch (AGB) stars are the producers of the main component of cosmic s-process elements. This scenario has been independently confirmed by three different fields: the computation of theoretical AGB stellar models, measurements of the chemical composition of AGB stars, and the analysis of the isotopic composition of meteoritic SiC grains. We present the nucleosynthesis and evolution of lowmass AGB stars by computing three different models with the same initial mass ( ) and different metallicities M p 2 M, ( [equivalent to the initial metal content of the 2 Z p 1.5 # 10 Sun], , and ). In the first part, we 3 4 Z p 1 # 10 Z p 1 # 10 describe the main features of the s-process, illustrating the motivations at the base of this work and the main characteristics of the FRANEC stellar evolutionary code, stressing the treatment of convection and the adopted input physics. We then review extant theoretical investigations of the nucleosynthesis and evolution of low-mass AGB stars. The s-process is believed to occur in low-mass AGB stars after the activation of the reaction. However, to date, no one has been able 13 16 C(a, n) O to explain the formation of a consistent pocket, as required C by observations. In the FRANEC code, the introduction of an exponentially decaying velocity profile below the convective envelope during third–dredge-up episodes allows a small amount of protons to diffuse in the C-rich He intershell, leading to the formation of a C-rich layer. The resulting C pocket partially overlaps with a more external N pocket, followed by a further minor Na pocket; the mass extension of the C pocket decreases along the AGB phase (the first one extending for ) simultaneously with the shrinking of 3 DM ∼ 1 # 10 M, the He intershell region. The exponential decay of the velocity profile depends on a free parameter b, which has been calibrated by maximizing the amount of C inside the pocket. Once the neutron source is obtained, the next step is the construction of a full nuclear network, starting from hydrogen and extending up to the Pb-Bi s-process ending point. The procedure that is followed in preparing this is described in detail, with particular emphasis on the choice of the experimental and theoretical reaction rates for both strong and weak interactions. The evolution and nucleosynthesis of the three computed models are then presented; the final elemental distributions are representative of those expected for the intrinsic carbon stars observed in the disk and in the halo of the Milky Way. A comparison with available spectroscopic analyses of s-process–enriched C stars shows reasonable agreement at solar metallicity while pointing out some problems in the modeling of AGB stars at low metallicities. For the case of solar metallicity, we formulate a new hypothesis on the origin of short-lived radioactive isotopes at the epoch of early solar system formation. For the first time in the literature, we furnish a uniform set of yields, at different metallicities, containing all the chemical species. Moreover, it is demonstrated that a different treatment of the opacity coefficients in the cool envelopes of low-mass AGB stars at low metallicities has dramatic effects on their massloss rate, therefore implying large changes in their final surface overabundances. This problem proves to be unsolvable, because of the lack of opacity tables calculated with different C/O ratios. The present work demonstrates that present-day computational power allows the coupling of a stellar evolutionary code and a full nuclear network. The introduction of an exponentially decaying profile of the velocities at the inner border of the convective envelope allows the formation of the C pocket. We propose our mechanism as a valid tool for the creation of a self-consistent s-process model, although other physical mechanisms have to be taken into account (e.g., rotation and magnetic fields). The inclusion of such processes in our code could have important effects on the mixing, with interesting consequences on the formation and survival of the C pocket: we intend to pursue the evaluation of their global effect in future work. Finally, the importance of the adopted mass-loss rate and the molecular contribution to opacity is pointed out, stressing the need for opacity tables with enhanced carbon and nitrogen abundances.