Our findings revealed that GLP-1 agonists were associated with a lower risk of dementia in patients with T2DM, compared to DPP-4 inhibitors or sulfonylureas. Here, DPP4 is linked to type 2 diabetes mellitus.