Chemical equilibrium has proven extremely useful for predicting the chemical composition of AGB atmospheres. Here we use a recently developed code and an updated thermochemical database that includes gaseous and condensed species involving 34 elements to compute the chemical equilibrium composition of AGB atmospheres of M-, S-, and C-type stars. We include for the first time Ti x C y clusters, with x = 1-4 and y = 1-4, and selected larger clusters ranging up to Ti 13 C 22 , for which thermochemical data are obtained from quantum-chemical calculations. Our main aims are to systematically survey the main reservoirs of each element in AGB atmospheres, review the successes and failures of chemical equilibrium by comparing it with the latest observational data, identify potentially detectable molecules that have not yet been observed, and diagnose the most likely gas-phase precursors of dust and determine which clusters might act as building blocks of dust grains. We find that in general, chemical equilibrium reproduces the observed abundances of parent molecules in circumstellar envelopes of AGB stars well. There are, however, severe discrepancies of several orders of magnitude for some parent molecules that are observed to be anomalously overabundant with respect to the predictions of chemical equilibrium. These are HCN, CS, NH 3 , and SO 2 in M-type stars, H 2 O and NH 3 in S-type stars, and the hydrides H 2 O, NH 3 , SiH 4 , and PH 3 in C-type stars. Several molecules have not yet been observed in AGB atmospheres but are predicted with nonnegligible abundances and are good candidates for detection with observatories such as ALMA. The most interesting ones are SiC 5 , SiNH, SiCl, PS, HBO, and the metal-containing molecules MgS, CaS, CaOH, CaCl, CaF, ScO, ZrO, VO, FeS, CoH, and NiS. In agreement with previous studies, the first condensates predicted to appear in C-rich atmospheres are found to be carbon, TiC, and SiC, while Al 2 O 3 is the first major condensate expected in O-rich outflows. According to our chemical equilibrium calculations, the gas-phase precursors of carbon dust are probably acetylene, atomic carbon, and/or C 3 , while for silicon carbide dust, the most likely precursors are the molecules SiC 2 and Si 2 C. In the case of titanium carbide dust, atomic Ti is the major reservoir of this element in the inner regions of AGB atmospheres, and therefore it is probably the main supplier of titanium during the formation of TiC dust. However, chemical equilibrium predicts that large titanium-carbon clusters such as Ti 8 C 12 and Ti 13 C 22 become the major reservoirs of titanium at the expense of atomic Ti in the region where condensation of TiC is expected to occur. This suggests that the assembly of large Ti x C y clusters might be related to the formation of the first condensation nuclei of TiC. In the case of Al 2 O 3 dust, chemical equilibrium indicates that atomic Al and the carriers of Al-O bonds AlOH, AlO, and Al 2 O are the most likely gas-phase precursors.