Ai Stay in Area?

it all depends on how you are implementing things. are you using behavior trees or script? how are you telling the ai where to go? is it a pawn or a character?

the most basic idea is that you only give the ai a location in the box area to move to. so on overlap set a flag(variable) that tells the ai your in the box and have a script that checks for that flag when setting the move to location. you could easily implement a switch or select node to accomplish this.