Production of cyclopeptides or cyclodepsipeptides in an enzyme reactor is effected in a system comprising an aqueous reaction mixture separated by a semipermeable membrane from an organic solvent serving as an extractant for the product. The reaction mixture comprises a peptide synthetase, aminoacids and optionally hydroxy acids, an energy source, divalent cations, a protective colloid and optionally a buffer. The reaction mixture is periodically regenerated in an aqueous buffer system (i.e. the membrane holding the reaction mixture is periodically removed and contacted with a dialysis buffer containing EDTA and a thiol) and the organic solvent is continuously replaced.