U start with giving its player computer insane, so it uses skills and flees.
the rest i mostly do with triggers, always actually
just make a trigger so he reatrets if he has for example 100 hp
tell me what kind of ai u need and ill make the code for it