Dendrites of hippocampal CA1 pyramidal cells amplify clustered glutamatergic input by activation of voltage-gated sodium channels and N-methyl-D-aspartate receptors (NMDARs). NMDAR activity depends on the presence of NMDAR co-agonists such as D-serine, but how co-agonists influence dendritic integration is not well understood. Using combinations of whole-cell patch clamp, iontophoretic glutamate application, two-photon excitation fluorescence microscopy and glutamate uncaging in acute rat and mouse brain slices we found that exogenous D-serine reduced the threshold of dendritic spikes and increased their amplitude. Triggering an astrocytic mechanism controlling endogenous D-serine supply via endocannabinoid receptors (CBRs) also increased dendritic spiking. Unexpectedly, this pathway was activated by pyramidal cell activity primarily in the theta range, which required HCN channels and astrocytic CB1Rs. Therefore, astrocytes close a positive and frequency-dependent feedback loop between pyramidal cell activity and their integration of dendritic input. Its disruption in mice led to an impairment of spatial memory, which demonstrated its behavioral relevance.