Patrol and Chase an Enemy
Goal
Use this pattern when Patrol is the fallback behavior and Chase should take over whenever the agent can see an enemy.
Tree structure

How it runs
A Selector considers its children from left to right, so it tries the chase Sequence before falling back to Patrol. Set the Sequence’s Abort Type to Both. While Patrol is running, the Lower Priority abort reevaluates Can See Enemy and interrupts Patrol when an enemy becomes visible. While the chase branch is running, the Self abort reevaluates the same Conditional and returns control to Patrol when the agent loses sight of the enemy.

Keep perception inside the Can See Enemy Conditional and movement inside the Chase Enemy Action. This makes the abort rule easy to understand and lets the same sight check control other behaviors. Can See Enemy is supplied by your game; Patrol and Chase Enemy can be your own movement Actions or equivalent tasks from a movement add-on.
Variations
Add a Search branch between Chase and Patrol when the agent should investigate the last known position. Use separate sight and target-validity conditions when losing visibility should not immediately discard the target.
Tasks used in this tree
Selector, Sequence, and Conditional Aborts.