The normal way to avoid walls is by using the pathfinding behavior, and following the resulting path.
These are the behaviors that interact with solid, per the solid manual page at
8 Direction, which is blocked by Solids
Bullet, which can optionally bounce off Solids
Car, which bounces off Solids
Line-of-sight, which by default has line-of-sight obstructed by Solids
Platform, which can land on Solids. Platform cannot jump on to solids from underneath - for this, use the Jump-thru behavior.
Pathfinding, which by default uses solids as path obstacles.
Tile movement, which is blocked by Solids
If you are not moving the enemy by one of these methods, they will not interact with solids.
What condition should be so that they bounce off the walls (for example, just like when using bullet behavior)
I can not turn the enemy at some angle, since I do not know exactly how angle he faces the wall.
If you are using your own movement system, you can trigger on collision with wall to set a new angle. To find out the angle, you can use the line of sight behavior. Cast a ray in the angle the sprite is moving, and use lineofsight.reflectionangle to get the reflected angle from the solid.