We present a new analysis of neutron capture occurring in low-mass asymptotic giant branch (AGB) stars suffering recurrent thermal pulses. We use dedicated evolutionary models for stars of initial mass in the range 1 to 3 M. and metallicity from solar to half solar. Mass loss is taken into account with the Reimers parameterization. The third dredge-up mechanism is self-consistently found to occur after a limited number of pulses, mixing with the envelope freshly synthesized C-12 and s-processed material from the He intershell. During thermal pulses, the temperature at the base of the convective region barely reaches T-8 similar to 3 (T-8 being the temperature in units of 10(8) K), leading to a marginal activation of the Ne-22(alpha, n)Mg-25 neutron source. The alternative and much faster reaction C-13(alpha, n)O-16 must then play the major role. However, the C-13 abundance left behind by the H shell is far too low to drive the synthesis of the s-elements. We assume instead that at any third dredge-up episode, hydrogen downflows from the envelope penetrate into a tiny region placed at the top of the C-12-rich intershell, of the order of a few 10(-4) M.. At H reignition, a C-13-rich (and N-14-rich) zone is formed. Neutrons by the major C-13 source are then released in radiative conditions at T-8 similar to 0.9 during the interpulse period, giving rise to an efficient s-processing that depends on the C-13 profile in the pocket. A second small neutron burst from the Ne-22 source operates during convective pulses over previously s-processed material diluted with fresh Fe seeds and H-burning ashes. The main features of the final s-process abundance distribution in the material cumulatively mixed with the envelope through the various third dredge-up episodes are discussed. Contrary to current expectations, the distribution cannot be approximated by a simple exponential law of neutron irradiations The s-process nucleosynthesis mostly occurs inside the C-13 pocket; the form of the distribution is built through the interplay of the s-processing occurring in the intershell zones and the geometrical overlap of different pulses. The C-13 pocket is of primary origin, resulting from proton captures on newly synthesized C-12. Consequently, the a-process nucleosynthesis also depends on Fe seeds, a lower metallicity favoring the production of the heaviest elements. This allows a wide range of s-element abundance distributions to be produced in AGE stars of different metallicities, in agreement with spectroscopic evidence and with the Galactic enrichment of the heavy s-elements at the time of formation of the solar system. AGE stars of metallicity Zr similar or equal to 1/2 Z. are the best candidates for the buildup of the main component? i.e., for the s-distribution of the heavy elements from the Sr-Y-Zr peak up to the Pb peak, as deduced by meteoritic and solar spectroscopic analyses. A number of AGE stars may actually show in their envelopes an s-process abundance distribution almost identical to that of the main component. Eventually, the astrophysical origin of mainstream circumstellar SiC grains recovered from pristine meteorites, showing a nonsolar s-signatures in a number of trace heavy elements, is likely identified in the circumstellar envelopes of AGE stars of about solar metallicity, locally polluting the interstellar medium from which the solar system condensed.