We investigated a monolithically integrated InP all-optical flip-flop (AOFF) circuit using a semiconductor optical amplifier based Mach-Zehnder interferometer with a feedback loop. We successfully achieved AOFF operation with 31-ps wide set/reset pulses.