Novel proline derivatives of the following formula (I) ##STR1## wherein each symbol is as defined in the specification, which specifically inhibit prolyl endopeptidase activity and can be used for the prevention and/or treatment of dementia and amnesia as agents which act directly on the central symptoms of dementia.