The invention relates to new imidyl compounds of the formula Ia and isoimidyl compounds of the formula Ib ##STR1## IN WHICH A denotes a divalent organic radical, especially an ethenylene, ethylene or propylene group. These compounds serve as curing agents for epoxide resins and give cured products with good mechanical and electrical properties.