The present invention provides a heterocyclylamine derivative of formula I: wherein the variable is defined herein, the derivative modulates the activity of phosphoinositide 3-kinase (PI3K) and is suitable for the treatment of diseases related to the activity of PI3K, These include, for example, inflammatory disorders, immune-based disorders, cancer, and other diseases.本發明提供式I的雜環基胺衍生物:其中變量是在本文中定義,所述衍生物調節磷酸肌醇3‑激酶(PI3K)的活性幷且適用於治療與PI3K的活性相關的疾病,包括(例如)炎性病症、免疫基病症、癌症以及其它疾病。