How to make AI stop chasing player when player sees AI

I will post a screenshot of my current blueprints soon. It seems straightforward enough, but I don’t have enough experience to allow this process to happen. Just a point in the right direction would be very helpful and appreciated. In summary: if player is running, AI is chasing player (I got that part).

What I need guidance with: If the Player turns around and sees the AI, the AI stops immediately. Furthermore, if the player moves towards the AI, the AI runs backwards at the same exact speed as the player (that’s crucial to me). It’s similar to boos in super Mario world. When Mario turns around, the boos stop. When Mario is not facing the boos, they chase him. That’s the effect I want, but in a first person shooter style with just one AI enemy and one player.

For “If the Player turns around and sees the AI, the AI stops immediately” you can do a Line Trace check . If your line trace (from Player position) hits the AI, you stop the AI. There are a lot of tutorials for Line Trace checks.
Now when your player sees the AI you get the location of AI and Player. Then you calculate the Distance between them and if the distance decreased you let the AI run away from your Player.
For adjusting the speed of the AI I would suggest you write your own Behavior Tree Task. It should look like that:

Now u can use this BTTask everywhere on your Behavior Tree to adjust the AI speed like this: