We prove that the category of (rigidified) Breuil–Kisin–Fargues modules up to isogeny is Tannakian. We then introduce and classify Breuil–Kisin–Fargues modules with complex multiplication mimicking the classical theory for rational Hodge structures. In particular, we compute an avatar of a ‘$p$-adic Serre group’.