The system is based on a genetic circuit with interchangeable cancer-selective promoters, microRNA target sites to detect distinct miRNA profiles of cancer cells, and genes that encode immune mediators such as interleukin-2 (IL-2), granulocyte-macrophage colony-stimulating factor (GM-CSF), or single-chain variable fragments (scFvs) against either programmed death-1 (PD-1) or programmed death-ligand 1 (PD-L1). Here, CSF2 is linked to cancer.