Data are mean ± s.e.m. a–g, Young (3–4-month-old) and aged (22–24-month-old) mice were administered vehicle or brain-penetrant C52 (10 mg per kg per day) for 1 month (a–c), 10 days (d) and 2 weeks (e–g). a, b, Hierarchical clustering of significantly regulated immune factors in the plasma (a) and hippocampus (b) (n = 3 young + veh, n = 4 mice per group for all other groups). c, Immunofluorescent staining of the hippocampal CA1 region for IBA1+ microglia. Scale bars, 10 μm. d, Mass labelling of brain microglia from mice treated with vehicle or C52 and administered U-13C-glucose 4 h before collection. Aged microglia increase incorporation of 13C-glucose into glycogen precursors and reduce incorporation into TCA cycle intermediates; this is reversed with EP2 blockade (n = 3 mice per group). Yo, young; A, aged. e, Per cent preference in the novel displacement object task. Paired two-tailed Student’s t-test, **P = 0.0014, ***P = 0.0003, ****P < 0.0001 (n = 8 young + veh, n = 9 mice per group for all other groups). f, Distance travelled to the target hole in the Barnes maze. Two-way ANOVA, age and treatment P < 0.0001; Tukey’s post hoc test, ****P < 0.0001 (n = 10 mice per group). g, Long-term potentiation in the CA1 hippocampal region. Two-way ANOVA, age and treatment P < 0.0001; Sidak’s multiple comparisons with Geisser–Greenhouse correction, **P = 0.0096 (n = 10–12 slices, n =5 mice per group). h, Synaptic mitochondria of 16-month-old mice treated with vehicle or C52 (10 mg per kg per day, 10 days), assayed for respiration control ratio (RCR).Two-tailed Student’s t-test, **P = 0.0025 (n = 7 mice per group). i–l, Young (3–4-month-old) and aged (22–24-month-old) mice were administered vehicle or brain-impermeant PF-04418948 (PF; 2.5 mg per kg per day, 6 weeks). i, Hierarchical clustering of significantly regulated immune factors in plasma and hippocampus (n = 3 young, n = 5 aged mice per group). j, Per cent preference in novel object location task. Paired two-tailed Student’s t-test, **P = 0.0074, ***P = 0.0004, ****P < 0.0001 (n = 7 young, n = 6 aged mice). k, Time to target hole in the Barnes maze. Two-way ANOVA, age (P = 0.0008) and treatment (P = 0.0034); Tukey’s post hoc test, ***P = 0.0005, **P = 0.0022 (n = 7 young, n = 6 aged mice). l, Hippocampal CA1 long-term potentiation; two-way ANOVA, age and treatment P < 0.0001; Sidak’s multiple comparisons with Geisser–Greenhouse correction, ***P = 0.002 (n = 6 slices, n = 5 mice per group). m, Principal component (PC) analysis of peritoneal macrophage transcriptomics. Ellipses represent 95% confidence intervals.