Roughly half of the abundances of the elements heavier than iron in the cosmos are produced by slow neutron captures (the s process) in hydrostatic conditions when the neutron density is below roughly 1013 n/cm-3. While it is observationally well confirmed that asymptotic giant branch (AGB) stars are the main site of the s process, we are still facing many problems in the theoretical models and nuclear inputs. Major current issues are the effect of stellar rotation and magnetic fields and the determination of the rate of the neutron source reactions. I will present these problems and discuss the observational constraints that can help us to solve them, including spectroscopically derived abundances, meteoritic stardust, and stellar seismology. Further, I will present evidence that the s process is not the only neutron-capture process to occur in AGB stars: an intermediate process is also required to explain recent observations of post-AGB stars.