Using RichAI make an agent go in the opposite direction of the target

I have one agent following another. If the leader gets stuck in the corner, is it possible to have the following agent simply go in the opposite direction of the target?

Hi

Maybe you are looking for http://arongranberg.com/astar/docs/class_pathfinding_1_1_flee_path.php?
But really the easiest way is to simply mirror the target position in the position of the agent.