  Active galactic nuclei (AGNs) exhibit variability across the entire
electromagnetic spectrum with distinct flaring episodes at different
frequencies. The high sensitivity and nearly uniform sky coverage of the Large
Area Telescope on board the Fermi satellite make it a powerful tool for
monitoring a large number of AGNs over long timescales. This allowed us to
detect several flaring AGNs in gamma rays, triggering dedicated multifrequency
campaigns on these sources from radio to TeV energies. We discuss the results
for two different types of flaring AGN: the flat spectrum radio quasar 3C 279,
in particular the coincidence of a gamma-ray flare from this source with the
drastic change of the optical polarization angle, and the first gamma-ray flare
from a radio-loud narrow-line Seyfert 1, PMN J0948+0022.
