A compound of the following formula:wherein R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, X, Y, and Z are as defined herein. Also disclosed is a method for inhibiting actively of fibroblast activation protein or for treating cancer or inflammation conditions with such a compound.