Context : Aims : We report the \gamma -ray activity from the intermediate BL Lac S5 0716+714 during observations acquired by the AGILE satellite in September and October 2007 . These detections of activity were contemporaneous with a period of intense optical activity , which was monitored by GASP–WEBT . This simultaneous optical and \gamma -ray coverage allows us to study in detail the light curves , time lags , \gamma -ray photon spectrum , and Spectral Energy Distributions ( SEDs ) during different states of activity . Methods : AGILE observed the source with its two co-aligned imagers , the Gamma-Ray Imaging Detector ( GRID ) and the hard X-ray imager ( Super-AGILE ) , which are sensitive to the 30 MeV–50 GeV and 18–60 keV energy ranges , respectively . Observations were completed in two different periods , the first between 2007 September 4 – 23 , and the second between 2007 October 24 – November 1 . Results : Over the period 2007 September 7 – 12 , AGILE detected \gamma -ray emission from the source at a significance level of 9.6- \sigma with an average flux ( E > 100 MeV ) of ( 97 \pm 15 ) \times 10 ^ { -8 } photons cm ^ { -2 } s ^ { -1 } , which increased by a factor of at least four within three days . No emission was detected by Super-AGILE for the energy range 18–60 keV to a 3- \sigma upper limit of 10 mCrab in 335 ksec . In October 2007 , AGILE repointed toward S5 0716+714 following an intense optical flare , measuring an average flux of ( 47 \pm 11 ) \times 10 ^ { -8 } photons cm ^ { -2 } s ^ { -1 } at a significance level of 6.0- \sigma . Conclusions : The \gamma -ray flux of S5 0716+714 detected by AGILE is the highest ever detected for this blazar and one of the most intense \gamma -ray fluxes detected from a BL Lac object . The SED of mid-September appears to be consistent with the synchrotron self-Compton ( SSC ) emission model , but only by including two SSC components of different variabilities .