The easiest way would be using the platforming behaviour on those ennemies, and control their jump depending on the fact there is no ground in front of them (using for exemple the overllaping at offest behavior, just an idea, not the only one nor best one), if they bump of a wall, make them go to the other direction, and sometimes, make them stop in place, then jump, and reitering the movement when they it land.